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.

Features

  • Script loader that caches JavaScript files in localStorage to reduce repeated network requests
  • Declarative API for loading one or many scripts with options for keys, expiration times, and versioning (unique)
  • Promise-based interface for chaining loads and reacting when resources are ready
  • Support for flags like skipCache, execute, and live to tune caching and execution behavior
  • Modular distribution with ES Module and CommonJS builds for modern bundlers and Node-based workflows
  • Extensible via custom handlers to support additional resource types beyond plain scripts

Project Samples

Project Activity

See All Activity >

Categories

Data Formats

License

MIT License

Follow Basket.js

Basket.js Web Site

Other Useful Business Software
Ship Agents Faster Icon
Ship Agents Faster

Transform your applications and workflows into powerful agentic systems at global scale.

Gemini Enterprise Agent Platform lets you rapidly build, scale, govern and optimize production-ready agents grounded in your organization's data. The platform enables developers to build custom or pre-built agents for virtually any use case. New customers get $300 in free credits.
Get Started Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of Basket.js!

Additional Project Details

Programming Language

JavaScript

Related Categories

JavaScript Data Formats Software

Registered

2025-11-21