←back to thread

Cache

(developer.mozilla.org)
147 points aanthonymax | 4 comments | | HN request time: 0.001s | source
Show context
arm32 ◴[] No.45129860[source]
I encourage everybody to work with service workers to encounter the horror that can be service workers gone wrong.

Pro-tip: Use Serwist (https://serwist.pages.dev/), don't learn Workbox. Serwist has beautiful Vite integration for preloading app chunks from a build manifest. Learn all the different caching strategies. Consider dynamic caching strategies, eg. switching between two strategies for a specific cache via messaging throughout the lifetime of the app. Deep breaths. Have a service worker kill-switch in case things go wrong.

replies(1): >>45129939 #
1. inetknght ◴[] No.45129939[source]
I encourage everybody to not use service workers so my computer doesn't waste resources.
replies(2): >>45129944 #>>45137494 #
2. arm32 ◴[] No.45129944[source]
Instructions unclear. Prefetching 8GB of media to a service worker cache on your browser. And you can't stop me! Muahahah
replies(1): >>45131846 #
3. inetknght ◴[] No.45131846[source]
about:config -> service -> change everything

then hate the modern internet >:(

4. nchmy ◴[] No.45137494[source]
You should get off the React-powered web if you're worried about that...