Description
Modern web applications will typically make use of more than one JavaScript or CSS framework. As the number of scripts add up, so does the number of HTTP requests. This leads to increased page load times and reduced performance. Basket.js is a project dedicated to aleviating this problem.
Basket.js loads your site's scripts into a page and saves them in localStorage so they can be reused after the session until they are expired. It also checks to see if the scripts are already in localStorage, and if not, loads them. This prevents unneccessary reloading of scripts and can improve load time and website performance.
basket.js alternatives and similar libraries
Based on the "Storage" category.
Alternatively, view basket.js alternatives based on common mentions on social networks and blogs.
-
localForage
💾 Offline storage, improved. Wraps IndexedDB, WebSQL, or localStorage using a simple but powerful API. -
jquery-cookie
DISCONTINUED. A simple, lightweight jQuery plugin for reading, writing and deleting cookies. -
Lovefield
DISCONTINUED. Lovefield is a relational database for web apps. Written in JavaScript, works cross-browser. Provides SQL-like APIs that are fast, safe, and easy to use. -
cookies.js
🍫 Tastier cookies, local, session, and db storage in a tiny package. Includes subscribe() events for changes. -
Hadmean
Generate powerful admin apps without writing a single line of code - Run `npx dashpress` to see some magic! -
proxy-web-storage
stokado can proxy objects of any storage-like, providing getter/setter syntax sugars, serialization, subscription listening, expiration setting, one-time value retrieval.
CodeRabbit: AI Code Reviews for Developers

* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of basket.js or a related project?
README
[basket.js logo](media/logo_src.png)
Basket.js is a script and resource loader for caching and loading scripts using localStorage
Introduction for the Non-Developer
Modern web applications will typically make use of more than one JavaScript or CSS framework. As the number of scripts add up, so does the number of HTTP requests. This leads to increased page load times and reduced performance. Basket.js is a project dedicated to aleviating this problem.
Basket.js loads your site's scripts into a page and saves them in localStorage so they can be reused after the session until they are expired. It also checks to see if the scripts are already in localStorage, and if not, loads them. This prevents unneccessary reloading of scripts and can improve load time and website performance.
Resources
Examples
Articles
- Basket.js: A JavaScript Loader With LocalStorage-based script caching
- basket.js caches scripts with HTML5 localStorage
- Basket.js for improved script caching
- How to Improve Loading Time with basket.js
Contribute
Style Guide
This project follows the Idiomatic guide to writing JavaScript - a concise extension to the jQuery Core Style guidelines, with the exception of multiple var statements. Please ensure any pull requests follow these closely.
Unit Tests
We are also attempting to get as much unit test coverage as possible. For this reason, please add unit tests for any new or changed functionality and remember to lint and test your code using grunt.
Also, please don't edit files in the "dist" subdirectory as they are generated via grunt. You'll find source code in the "lib" subdirectory!
Building
To build the project, you will first need to install the necessary dependencies (such as RSVP) using npm and Bower.
Run:
$ npm install & bower install
in the project root to get everything you need. Next, to actually build the project you will need Grunt.
Run:
$ grunt release
to generate a new release, otherwise just running grunt test
will run the unit tests.
Team
![]() |
![]() |
![]() |
![]() |
---|---|---|---|
Addy Osmani | Sindre Sorhus | Andrée Hansson | Mat Scales |
License
MIT © Basket.js team
*Note that all licence references and agreements mentioned in the basket.js README section above
are relevant to that project's source code only.