Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8438107
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T07:36:59+00:00 2026-06-10T07:36:59+00:00

I have a webapp for iPad with the meta tag: <meta name=apple-mobile-web-app-capable content=yes> When

  • 0

I have a webapp for iPad with the meta tag:

<meta name="apple-mobile-web-app-capable" content="yes">

When I open up the app from the homepage (web-app-capable version) or type in the address in Mobile Safari the contents of localStorage are different. I have confirmed that the addresses are identical by printing location.href.

All changes made to localStorage while using Mobile safari are reflected in the web-app-capable version, but changes made in the web-app-capable version are not reflected in the Mobile Safari version.

The domains are identical, localStorage should be identical. What in the world is going on? Can this be fixed?


Update – Solution: Following suggestion #2 from the accepted answer (forcing the user to be in fullscreen mode) I added this bit of code:

if(("standalone" in window.navigator) && !window.navigator.standalone)
    window.location = "instructions.html";

So, if you are using a browser that supports standalone mode, and you are not in standalone mode, redirect to a page (instructions.html) which shows the user how to add the app to the home screen.

Thank you to everyone for their input!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T07:37:01+00:00Added an answer on June 10, 2026 at 7:37 am

    Summary:

    Safari and full-screen web apps (a.k.a. web-app-capable) have separate in-memory write-through caches of the localStorage data. Each time the full-screen app becomes active, it reloads the localStorage from disk (allowing it see Safari’s changes). However, when Safari becomes active, it doesn’t reload the localStorage data from disk, so it won’t see changes made in the full-screen app unless you kill Safari and restart it.

    Full Explanation:

    There are only two hard problems in Computer Science:

    1. cache invalidation
    2. naming things
    3. off-by-one errors

    The buggy behavior in localStorage is a result of problem #1. Here’s why:

    When the iOS browser engine loads, it reads the data for localStorage from disk and caches it in memory. Then each time you read data (e.g. getItem), the data is read from memory, not from disk; and when writing (e.g. setItem) the data is written to memory, and then (asynchronously) flushed to disk. Since localStorage is synchronous, this implementation is a totally reasonable. If it went to disk for all reads and writes, your javascript would be blocked on every read/write to perform expensive disk IO.

    The problem is that a full screen web app (let’s call it a FSWA) uses a separate instance of the iOS browser engine, and although a FSWA shares the same location on disk for the localStorage data, it does not share the in-memory cache of localStorage data with Safari.

    When you add the fact that FSWA completely reloads (which means the localStorage data is reloaded from disk) each time they become the active application, you get the behavior that you are seeing.

    Here’s the behind the scenes…

    1. user makes a change that writes data to localStorage in Safari
    2. Safari writes data to Safari’s in-memory localStorage cache
    3. Safari flushes localStorage data from cache to the disk
    4. user leaves safari and launches the FSWA
    5. FSWA loads and reads localStorage data from the disk into in-memory cache
    6. user sees the data that was changed (in step #1) in Safari
    7. user makes a change in the FSWA that writes data to localStorage
    8. FSWA writes data to its localStorage cache (Safari’s cache is not updated)
    9. FSWA flushes its localStorage cache data to disk
    10. user switches back to Safari
    11. Safari was already running, and it does not reload the localStorage data from disk
    12. Safari reads the old data from its existing in-memory cache
    13. user does not see changes made in step #7

    To prove this, you can kill Safari between step #4 and step #10. Then when you relaunch Safari in step #11, it will reload the localStorage from disk and you will see the data written by the FSWA.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The Problem: With <meta name=apple-mobile-web-app-capable content=yes /> set, all of my jsonp requests are
<meta name=apple-mobile-web-app-capable content=yes /> <meta name=apple-mobile-web-app-status-bar-style content=black-translucent /> $('#btn-fb-share').click(function() { $('#btn-fb-share').attr(disabled, disabled); window.open(url,Mywindow,location=yes,menubar=yes); });
We are trying to create an ASP.NET web app using the apple-mobile-web-app-capable meta-tag to
I have a MVC3 project for running on the iPad in the web-app mode.
We're working on a web app that will deployed to mobile devices, iPad, iPhone,
I'm developing a full-screen web app for an iPad that will have a series
If you have used the Google Maps web app on your iphone or ipad
I'm developing an iPad Web App for a client. Unfortunately I don't have an
I'm currently trying to set up an iPad web app. I have my home
I have an Asp.Net MVC 3 mobile web app and get requests fail with

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.