# addyosmani/basket.js

A script and resource loader for caching & loading files with localStorage

Repository: https://github.com/addyosmani/basket.js
Canonical: https://ross.abutalabs.com/products/basketjs
Language: JavaScript
License: MIT
License Family: permissive
Last push: 2025-03-02T06:16:58+00:00

## Health v2 (maintenance only)
Score: 27/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 9, release rhythm 8, longevity 100
- inputs: {"age_days": 5299, "days_push": 549, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 3350, forks 273 (observed 2026-08-28T04:07:57.802464+00:00)

## What it is
Basket.js is a JavaScript script loader that caches scripts and resources in localStorage to improve page load times. It provides a Promise-based API with support for versioning, expiration, and custom content-type handlers.

## Use cases
- cache javascript scripts in localstorage
- load scripts faster on repeat page visits
- script loader with expiration control
- version cached javascript assets
- preload scripts with promise-based api
- cache css and other resources in the browser

## When to choose
- you want to skip the HTTP cache and store scripts in localStorage for faster repeat loads
- you need fine-grained control over script caching with versioning and expiration
- you want a small, promise-based script loader

## When to avoid
- you rely on modern HTTP caching headers and service workers instead
- your scripts exceed localStorage size limits (~5MB)
- you need to cache assets for non-browser environments

## Facets
- artifact type: library
- maturity: maintenance
- function: caching, http-client
- domain: web-development, frontend, performance
- platform: browser
- tags: script-loader, localstorage, asset-loading, promise-based, javascript

## Member repositories
- addyosmani/basket.js (main) score 27

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:07:57.802464+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:40:57.893803+00:00, confidence not recorded.
  - readme: https://github.com/addyosmani/basket.js (fetched 2026-08-28T04:07:57.802464+00:00, sha 660a2dcac3d4)
  - registry_npm: https://registry.npmjs.org/basket.js (fetched 2026-08-29T09:34:13.433734+00:00, sha 5e6a6909a0c2)
- Data as of 2026-08-30T08:39:29.467469+00:00.
