←back to thread

Cache

(developer.mozilla.org)
147 points aanthonymax | 1 comments | | HN request time: 0.206s | 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 #
inetknght ◴[] No.45129939[source]
I encourage everybody to not use service workers so my computer doesn't waste resources.
replies(2): >>45129944 #>>45137494 #
1. nchmy ◴[] No.45137494[source]
You should get off the React-powered web if you're worried about that...