Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cache all HTTP data for offline use #286

Open
RangerMauve opened this issue Feb 25, 2025 · 4 comments
Open

Cache all HTTP data for offline use #286

RangerMauve opened this issue Feb 25, 2025 · 4 comments
Labels
enhancement New feature or request

Comments

@RangerMauve
Copy link
Member

Most sites don't use service workers and the such so as soon as you go offline, nothing is available if it depended on HTTP. It'd be good if Agregore cached stuff specifically for offline usage

  • Set up a leveldb (or sqlite? or fs?) http cache
  • Listen on requests and cache responses for GET (maybe just top level frame content without css/js even?)
  • Catch network errors in requests and serve from cache
  • Provide option to clear offline cache
  • Use an "Least Recently Used cache" to clear old data with some sort of user config for "num saved sites", maybe default to a few thousand or based on size? If size we should be able to configure it
@RangerMauve RangerMauve added the enhancement New feature or request label Feb 25, 2025
@RangerMauve
Copy link
Member Author

Regarding Kiwix, we already have WebRecorder built in so this wouldn't add anything.

That's a good point though that we could potentially do this as a browser extension instead of doing it in native code.

We already use webRequest to track history so it should be possible to have something that listens on something like webrequest.onErrorOccured and serve from an IndexedDB backed cache.

@RangerMauve
Copy link
Member Author

THis might be relevant? https://github.com/gilmoreorless/chrome-cdn-offline-proxy

@akhileshthite
Copy link
Contributor

THis might be relevant? https://github.com/gilmoreorless/chrome-cdn-offline-proxy

Yep, a browser extension is a good idea.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants