Hacker News new | past | comments | ask | show | jobs | submit login

Edit: below isn’t true. You could set immutable in cache header and the browser wouldn’t verify.

—— Original comment:

With browser cache, the browser stills need to send a HEAD request to see if the content was modified. These requests are noticeable when networks are spotty (train, weak mobile signals…)

Service Worker could cache the request and skip the head requests all together




Set max-age in the Cache-Control header to a high value and the browser will not need to revalidate. When deploying a new version, "invalidate" the browser cache by using a different filename.


Or keep the file name and send the file with a query string of some changed numeric value


Not if you tell the browser it's guaranteed fresh for 10 minutes and then use cache-busting in the URL


Oh yeah. The immutable tag right? Total forgot about that




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: