←back to thread

Cache

(developer.mozilla.org)
147 points aanthonymax | 1 comments | | HN request time: 0.205s | source
Show context
judah ◴[] No.45129306[source]
Cache is super useful for making web apps available offline.

I run a guitar chord chart site[0] that uses cache to enable offline experience; any chord charts you view while online are then available offline thanks to cache. It works pretty great. You service worker intercepts HTTP requests and can first check the cache for cached request/responses.

[0]: https://messianicchords.com

replies(1): >>45129943 #
inetknght ◴[] No.45129943[source]
> Cache is super useful for making web apps available offline.

... until you find someone who has very low cache available. Or cache gets evicted.

replies(5): >>45129989 #>>45130694 #>>45131396 #>>45131818 #>>45132139 #
qwertox ◴[] No.45130694[source]
Maybe they should have put the line

The browser does its best to manage disk space, but it may delete the Cache storage for an origin.

in a warning box.

replies(1): >>45130788 #
1. NoahZuniga ◴[] No.45130788[source]
You know, you could just improve this. All you need to go is find the github link for the article at the bottom of the page, find the edit button, and github will guide you through the rest of the process.

(I've done so myself a few times)

If you prefer you can also clone and make a pull request using standard git tools.