Assets Cacher banner

Assets Cacher

2 devlogs
6h 6m 58s

This is a lightweight Chrome extension to reduce bandwidth usage by caching frequently downloaded assets like images, scripts, and fonts, with per site controls.

This project uses AI

Used Gemini to debug caching issues

Demo Repository

Loading README...

akhil

Refactor background, add base CSS & utils

Major refactor: improve service worker reliability, storage handling, and UI styling.

  • background.js: rewritten for robustness and performance — added DEBUG flag, storage schema versioning, storage hydration barrier, abbreviated badge util, LRU asset size cache (MAX_ASSET_MEMORY=3000), improved size estimation heuristics, extraction of flush logic, flush on onSuspend, periodic flush daemon, safer DNR dynamic-rule diffing, per-site rule allocator cleanup, more defensive webRequest handling (skip non-page-initiated requests), and stronger message validation/handlers (purgeAll now removes dynamic DNR rules and cleans allocator/site prefs).
  • manifest.json: bumped extension version to 2.1, removed declarativeNetRequestFeedback permission, added content_security_policy for extension pages.
  • UI: added base.css (shared styles) and switched options.html to use it; multiple markup/style cleanups for popup/options.
  • Added shared/utils.js and updated popup/options assets (popup.html/.js/.css, rules.json, README) to reflect behavior and architecture changes.

Why: reduce I/O thrashing, make in-memory state reliable across SW lifecycle events, improve bandwidth accounting and UX, and centralize shared styles/utilities.

Attachment
0
akhil

Do you visit websites that are heavy on images or use the same JavaScript libraries on every page? Every time you navigate, your browser might be redownloading these same assets, consuming your bandwidth and slowing down page loads.

Attachment
0