Basket.js
A script and resource loader for caching & loading files
Basket.js is a script and resource loader that uses localStorage to cache JavaScript files in the browser for faster subsequent page loads. Instead of fetching the same scripts from the network on every visit, Basket.js downloads them once, stores them locally under a configurable key, and reuses the cached version until you decide to invalidate or expire it. The library provides a higher-level API where you describe which scripts to load, along with metadata like expiration time, a unique version string, or whether to execute the script immediately. Modern versions expose a Promise-based interface and support modular usage via ES Modules or CommonJS, so you can integrate it into contemporary build setups and bundlers. It also offers options like skipCache (force bypassing cache), live (always fetch fresh), and custom handlers for different content types beyond JavaScript.