Why does my web app lose its saved data on iPhone after a week?

Ship ItChecked against the official source

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

  1. Our advice: keep anything users can't afford to lose in your backend database.
  2. Use browser storage only as a cache.
  3. Suggest that iPhone users add your web app to the Home Screen.
  4. 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

Checked on 10 Oct 2026. Prices, limits and settings change, so check the source before you rely on them.