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!