Skip to main content
Median-powered apps automatically honor the cookie expiration settings defined by your web platform, ensuring consistent session behavior across both browser and native mobile environments. This guide explains how cookie persistence works, how to configure custom expiration policies, and what platform-level limitations apply on Android and iOS.

What are cookies used for?

Cookies serve three primary functions in mobile web apps:
  • Session management: Maintaining authenticated user sessions and signed-in states across app launches.
  • User preferences and personalization: Persisting settings such as language selection, UI theme, or layout configuration.
  • Tracking and analytics: Capturing behavioral data for usage insights and performance monitoring.
By default, Median apps respect the Expires and Max-Age attributes set by your server when issuing cookies. No additional configuration is required if your server already defines appropriate cookie lifetimes.
Security recommendationFor critical session data or long-term authentication tokens, use secure storage via the Face ID / Touch ID and Android biometric plugin rather than relying solely on cookies. Cookies are inherently subject to platform-level eviction policies.
If your server-defined cookie lifetimes do not meet your app’s requirements — or if you lack access to modify server-side configurations — you can override cookie expiration behavior directly in Median App Studio. To configure a custom cookie expiration policy:
  1. Open Median App Studio.
  2. Navigate to Web Overrides → Cookie Persistence.
  3. Switch the setting from Default to Custom Cookie Expiry.
  4. Define your desired cookie lifetime duration.
Cookie Persistence setting set to Custom Cookie Expiry in App Studio

App configuration: Cookie Persistence

This override is useful in scenarios such as:
  • Extending session duration beyond server-defined limits (for example, keeping users signed in for 30 or 90 days).
  • Standardizing cookie behavior across environments without modifying backend configuration.

Platform limitations

Cookie persistence is subject to the constraints of each platform’s native WebView component. The following limits apply on Android and iOS.

Android WebView

Known real-world limitations:
  • Cookies may be lost if the app is uninstalled or if Android clears app storage.
  • While technically possible, cookies set for 10+ years may not reliably persist through OS updates or device resets.

iOS WKWebView

Known real-world limitations:
  • Apple’s Intelligent Tracking Prevention (ITP) may automatically purge cookies after 7 days if there has been no recent user interaction with the associated domain.
  • Cookies relying solely on Max-Age or Expires without active user engagement are especially vulnerable to ITP eviction.

Frequently asked questions

No. The cookie storage used by your Median app’s WebView is completely isolated from the device’s native browser (such as Safari on iOS or Chrome on Android). A user who signs in through your Median app will not be automatically signed in when they open the same website in their mobile browser, and vice versa. Each environment maintains its own independent cookie jar. This is a platform-level constraint that applies to all WebView-based apps, not specific to Median.
It depends on the platform and how the cache clear is triggered.On Android, using the Clear WebView cache feature clears cached resources but does not necessarily remove cookies as these are stored separately in the WebView’s cookie store. However, uninstalling the app or clearing app data via Android’s system settings will delete all cookies.On iOS, cookies managed by WKWebView are stored in shared process storage; clearing website data will remove them. If your app programmatically clears cookies, all stored session data will be lost regardless of the expiration policy set in App Studio.
Last modified on November 7, 2026