Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS mobile web app not updating

Maybe I am missing something obvious, sorry but...

I have a simple jquery mobile web app that when I make a change I upload it to my server. I then open it using Safari via the url and everything is there all OK. If I then make a home screen icon shortcut and open it via the app icon I get an old version ie the version before the change. On my devices I have cleared the cache and history and deleted any old home screen icons. I check the server version and only the new one is there. Where is jquery mobile or iOS storing the old version and how can I clear it.

Thanks!

like image 850
Tom Avatar asked Dec 14 '11 16:12

Tom


4 Answers

I also did everything I could, but could find a solution. iOS devices are caching this icon forever it seems, no matter what you do.

The only solution I finally came up with: whenever you replace the icon, add a hash or version string to the URL so the path differs. For example:

<link rel="apple-touch-icon" sizes="144x144" href="images/app-icon.png?v2">
like image 96
acme Avatar answered Sep 19 '22 14:09

acme


Same thing for me. If I "Add to Homescreen" another url it works fine and is updating fine, but the older one refuses to update no matter what I do. Works fine if you load it in Safari though.

I've looked everywhere on the internet and simply can't find an answer. Clearing cache/data does not help at all. I'm considering putting in a "refresh" link in my pages just to see what the hell is wrong with it.

Some people have said that the problem miraculously fixes itself after a while... can be 5 minutes or 1 hour...

like image 39
Sun Avatar answered Sep 18 '22 14:09

Sun


I've been effing with this for over an hour and nothing seemed to be working. However if I tap on some white space in the app after I've added it to my home screen, it refreshes and I get the latest and greatest version. Close the app and reopen it and back to a previous version.

like image 33
Scott Avatar answered Sep 20 '22 14:09

Scott


EDIT: This could be achieved by doing one of the following:

EDIT 2: The browser just caches the touch icon so you basically just have to change it in any way.

  • Changing the path to the file,
  • Deleting the Manifest File, loading the app so it force refreshes and then putting the Manifest File back

Original Answer:

Basically, what to have to do is remove the web application and then change the manifest file or just change the manifest file so that the next time the person opens the page it is forced to reload. After it has force reloaded you can upload a new manifest file.

Alternatively

You could just wait about 1 or 2 hours for the app to eventually refresh.

like image 40
SamJakob Avatar answered Sep 20 '22 14:09

SamJakob