I'm excited to release idb-sideloader.js, a new JavaScript module that leverages IndexedDB for powerful static asset caching in web apps.
By sideloading assets directly into the browser, idb-sideloader.js enables:
- Lightning fast subsequent page loads
- Offline asset availability
- Reduced server load
It also polyfills URLSearchParams to improve compatibility with Safari and older browsers.
Check it out:
- npm: https://www.npmjs.com/package/idb-sideloader
- GitHub: https://github.com/clockelliptic/idb-sideloader
Idb-sideloader is already being used in production on SustainedNutrition.com. I'd love feedback from the community on how we can improve it!
Next up on my to-do list is to detect iOS browsers and to convert images and other objects to typed arrays prior to storage, since iOS webkit browsers don't always support IndexedDB Blob storage.
Let me know if you end up using idb-sideloader.js in your projects by dropping by my LinkedIn and sending me a DM! I'm excited to see what people build with it!