Remix.run Logo
judah 4 days ago

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

inetknght 4 days ago | parent [-]

> Cache is super useful for making web apps available offline.

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

wredcoll 4 days ago | parent | next [-]

Yeah, good point, it also doesn't help people when their cpu catches fire.

stogot 2 days ago | parent [-]

It also won’t work when a EMP is used over the continental United States.

qwertox 4 days ago | parent | prev | next [-]

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.

NoahZuniga 4 days ago | parent [-]

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.

stonogo 4 days ago | parent | prev | next [-]

Or their computer breaks. Or their electricity cuts off. Or an asteroid hits them.

...things can be super useful without being flawless.

judah 4 days ago | parent | prev | next [-]

...that's OK.

My app works fine online or offline. If you're offline and you ran out of disk space and the cache got evicted, ok, you can't use my web app offline.

(And, if you're out of disk space, all bets are off. You're gonna have other, more significant problems beyond a guitar chord chart site not working offline.)

arm32 4 days ago | parent | prev [-]

We don't talk about those people.

4 days ago | parent [-]
[deleted]