Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS standalone web app cant load new content after upgrade to iOS7

I have a JavaScript application that I run in standalone mode (added to home screen) on an iPad.

I have upgraded from iOS 6 to iOS 7 and now my app is always loading the same content, it keeps caching. Even if I load my JS and CSS files dynamically on every app load with unique timestamp as parameter. I needed that to be sure that JS and CSS files are not cached and it worked in iOS 6.

I tried the following:

  1. removing app from home screen

  2. deleting cookies and website data

  3. restarting iPad

  4. I had manifest="manifest.appcache" removed that (then tried again 1 to 3)

  5. I have added following meta tags

    <meta http-equiv="cache-control" content="no-cache"> and
    <meta http-equiv="pragma" content="no-cache">

  6. Since I develop this locally and that page is served from my desktop PC I have tried to change the IP of my PC and then tried 1 to 3 but it did not solve my problem.

So all of my changes are not appearing no matter if they are in the HTML file or JS.

There is obviously some changes in how iOS handles standalone apps. What am I missing?

like image 840
Develoger Avatar asked Sep 23 '13 12:09

Develoger


1 Answers

  1. It seems that making a change to your manifest file (like adding a version number ), should make the app reload content: Mobile Web App not clearing cache properly

  2. You should add a version number to your CSS and JS urls to solve caching issues. e.g. file.css?v=2

Cheers, Z.

like image 100
Zeno Popovici Avatar answered Sep 21 '22 03:09

Zeno Popovici