Safari Home Screen Web App Storage and Eviction Rules
This article provides a quick overview of the storage quota limits and data eviction exemptions that apply to Home Screen web apps created through the Safari web browser. It explains how much device space these web applications can utilize, how isolated storage containers function, and the specific protections Home Screen apps receive against Safari's standard automatic data deletion policies.
Storage Isolation
When a user adds a website to their Home Screen on iOS, iPadOS, or macOS, Safari creates an isolated storage container for that specific web app. Data stored in the Home Screen web app—including IndexedDB, Cache API, LocalStorage, and cookies—is completely separate from the data stored for the exact same website inside the standard Safari browser app.
Storage Quota Limits
WebKit, the engine powering Safari, allocates storage dynamically based on the device's total disk space. For modern versions of Safari (Safari 17 and later), the following storage quotas apply to Home Screen web apps:
- Per-Origin Limit: A single Home Screen web app can use up to 60% of the device's total disk space.
- Embedded Content Limit: Third-party iframes embedded within the Home Screen web app are limited to 10% of the main app's quota (up to 6% of the total disk space).
- Overall Origin Limit: Combined data across all web apps and browser origins cannot exceed 80% of the device's total disk space.
- LocalStorage Limit: While APIs like IndexedDB and
the Cache API share the massive 60% origin quota, synchronous
localStorageremains strictly capped at 5 MB per origin.
On older versions of iOS (prior to iOS 17), Home Screen web apps were restricted to a strict 50 MB limit for the Cache API and a 500 MB to 1 GB limit for IndexedDB before the system either blocked further writes or prompted the user for permission. Modern Safari versions do not show storage permission prompts to the user.
Exemption from the 7-Day Eviction Policy
In standard Safari browser tabs, Intelligent Tracking Prevention (ITP) enforces a strict 7-day cap on all script-writable storage. If a user does not interact with a website in Safari for seven days, WebKit deletes all of its IndexedDB, LocalStorage, Service Worker, and Cache API data.
Home Screen web apps are completely exempt from this 7-day inactivity eviction rule. Because the user explicitly chose to install the web app to their Home Screen, Safari treats it as a trusted application. The web app's data will remain intact indefinitely, even if the user goes weeks or months without opening it.
Storage Pressure and Persistent Storage
While Home Screen web apps are exempt from the 7-day ITP timer, they are still subject to operating system storage pressure. If a user's device runs critically low on available disk space, the operating system may clear web data using a Least Recently Used (LRU) eviction policy. When this happens, all data for the origin is cleared at once to prevent corrupting the app's state.
To protect against low-storage eviction, Home Screen web apps can request persistent storage:
- Default Mode (Best-Effort): By default, web app storage is classified as "best-effort," meaning it can be evicted if the device runs out of space.
- Persistent Mode: Developers can call the
navigator.storage.persist()API. If granted, the web app's data is exempt from automatic eviction under storage pressure and will only be deleted if the user manually removes the Home Screen web app or clears their device data.
Having a web app installed on the Home Screen heavily biases WebKit
heuristics to automatically grant the
navigator.storage.persist() request without requiring any
manual confirmation from the user.