A minimal 500-byte fetch polyfill for environments lacking native fetch support.
Unfetch is a minimal fetch polyfill that provides the `fetch()` API for making HTTP requests in browsers that lack native support. It solves the problem of needing modern fetch functionality in legacy environments without adding significant bundle size. The implementation focuses on core features like headers and JSON/text responses while maintaining an extremely small footprint.
Frontend developers working on projects that must support older browsers (like IE8+) but want to use the fetch API without heavy polyfills. It's also suitable for developers building lightweight libraries or applications where bundle size is a critical concern.
Developers choose Unfetch because it's the smallest fetch polyfill available—around 500 bytes gzipped—while still providing essential functionality. Its minimal approach avoids bloat and offers a familiar API, making it ideal for projects where every byte counts and full spec compliance isn't required.
🐕 Bare minimum 500b fetch polyfill.
At only about 500 bytes gzipped, it's one of the smallest fetch polyfills, minimizing bundle size impact for performance-sensitive projects, as highlighted in the README's badges.
Works in browsers as old as IE8+ when a Promise polyfill is present, enabling modern fetch API usage in outdated environments, making it a practical choice for legacy codebases.
Can be used as a polyfill to globally install fetch or as a ponyfill for module imports, offering versatility in different build setups, as shown in the usage examples.
Focuses on essential features like headers and text/json responses, avoiding bloat from full spec compliance, which keeps the API simple and familiar for basic use cases.
Missing advanced Fetch spec features like streaming, full Headers class implementation, and uses Arrays instead of Iterables, which may cause compatibility issues in edge cases, as admitted in the README.
Only supports 'credentials: "include"' and lacks 'same-origin', making it inadequate for applications requiring precise control over cookie sending in CORS scenarios, as noted in the caveats.
Designed solely for browsers; server-side usage requires the separate isomorphic-unfetch package, adding overhead for universal JavaScript applications, which is a documented limitation.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.