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

Cache-Control gets ignored when browser tabs are "paged out", especially on mobile. It's egregious on Mobile Safari, where effectively only two or three pages are "live" and the remainder have to be re-grabbed. No connection? No re-grab. The version fetched might be any version from any point in history, including your "does this work?" flight that you pushed (because of course you pushed one). There's also very little mechanism to tell ahead-of-time whether a network request will work - you'll have to essentially pre-flight all server communication, which is doable, but not easily accessible the way that a "save locally, upload in background once internet" would work as a native app.



As an alternative to having them download a separate app, have them download a browser that supports the stale-if-error Cache-Control directive. It's fair to ask people doing serious work not to use Mobile Safari.

It's also fair to ask them to keep checking the native or web app to make sure the data was sent, so one doesn't have to rely on web workers staying alive in the background. Just save to localStorage, catch network errors and keep retrying.




Consider applying for YC's Summer 2025 batch! Applications are open till May 13

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

Search: