Why does my web app lose its saved data on iPhone after a week?
Ship ItChecked against the official source
Source checked 10 Oct 2026 · Published 23 Oct 2026 · Last reviewed 23 Oct 2026 · By Ctrl+Z Therapy (how we test)
The short answer
WebKit's Tracking Prevention Policy says ITP deletes all cookies created in JavaScript and all other script-writeable storage after 7 days of no user interaction with the website. That storage includes IndexedDB, LocalStorage, Media keys, SessionStorage, and service worker registrations and cache. Web apps added to the Home Screen are exempt from that 7-day cap, but WebKit's storage policy says persistence is not guaranteed and data can be evicted.
What to do
- Our advice: keep anything users can't afford to lose in your backend database.
- Use browser storage only as a cache.
- Suggest that iPhone users add your web app to the Home Screen.
- Ask your AI tool: "Find everything this app stores only in localStorage or IndexedDB. Move what users would miss into the database, and keep the browser copy only as a cache."
Good to know
- This covers Safari. Other iPhone browsers aren't covered here.
- For cookies, the rule covers cookies created in JavaScript, not all cookies.
Source
- WebKit: Tracking Prevention Policy
- WebKit blog: Updates to Storage Policy
- WebKit blog: Full third-party cookie blocking and more
Checked on 10 Oct 2026. Prices, limits and settings change, so check the source before you rely on them.