It would appear that Apple have changed the way homescreen/standalone web apps work in iOS 6. According to various blog posts (example) these apps now get their own dedicated space for storing their cached files, sqllite dbs, local storage etc, rather than sharing with the Safari browser like before.
Before iOS 6 when developing I used to go through the following procedure religiously to clear the cache...
Unfortunately now that Apple have moved the goal posts this same procedure doesn't seem to work. After clearing, even though my changes are picked up in Safari, when I add to the homescreen and launch the app the old HTML,JS etc is still picked up.
Does anyone know how to reliably fully clear the cache in iOS 6?
I can't verify the cache being cleared properly but this worked for me :
In order to do this, you need to allow Web Inspector on your iOS device. Go to Settings > Safari > Advanced > Web Inspector (it has to be active) And you have to activate the developer menu on your computer's Safari. Go to Preferences > Advanced > Activate Developer menu
Somehow the Webapp cache got cleared and i got the non-cached code.
I found a a work-around. Just put a link on the web page itself for users who are having trouble seeing new version...
<a href="javascript:top.frames.location.reload();">refresh</a>
It works just like the iPhone/iPad refresh button on the address bar!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With