Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Anyone experience caching issues with web apps ran in full-screen mode iOS/Mobile Safari?

I'm having a very strange issue with my web app (which is ran in full-screen mode from the home screen) and Mobile Safari. Usually, as I develop, I edit the files with the changes that I want to make and then I re-launch the app from the homescreen. As per iOS design, the web app will refresh and reload the site.

However, in some odd but frequent situations, when I launch the application I get a cached older version of the app. If I navigate to the app through Mobile Safari (not from home screen) then everything looks great.

I've added meta no cache tags all over the space and even attempted to thwart the cache by adding ?query strings to .css files, etc, but for some odd reason when a cached version decides it wants to display - it will display, no matter what. Clearing cache and data from the settings menu and then relaunching will only sometimes fix the problem.

Anyone else run into this issue? If so, how did you fix it? Is it a known iOS bug? I'm thinking about adding some onLoad code to check if the application is running in full screen mode and then explicitly force a refresh.

Please help - this is extremely annoying and frustrating!

Rich

like image 866
Rich Avatar asked Jan 12 '12 02:01

Rich


1 Answers

In my own testing I also found that applications run from the "Home Screen" on iOS won't properly refresh their CSS and JS files. This appears to be an ongoing problem. The only solution that worked for me was to:

  • Change the device date forward by 2 days or so..
  • Reload the app from the Home Screen..
  • Reset the date.

I also tried deleting and recreating the icon from the home screen and clearing the cache in Safari.

"Happily" you are not the only one seeing this problem.

https://discussions.apple.com/thread/3385843?start=90&tstart=0

Incase anyone asks. There were no manifest files involved in my testing.

iPad 2 with IOS 5.1.1.

like image 139
AnthonyVO Avatar answered Nov 12 '22 03:11

AnthonyVO