Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Clearing the application cache for websites that you "Add to your Home screen" on the iPad

The Problem: I have tried just about everything I can think of to clear the cache of a website that has been added to my home screen. Here is what I have tried.

  1. Close all running instances of the webapp by double clicking the home screen.
  2. Closed all instances of Safari.
  3. Removed the webapp from the Home Screen.
  4. Settings -> Safari -> Cleared Cache and History.

In Safari, the cache is all cleared and I see the latest version of my web app. However, Once I add it to the home screen, it will display the old version. If i append a '#' to the url it will load only the new html file, however it looks like all the css includes are still cached.

Any ideas? Thanks!

like image 377
Fostah Avatar asked Dec 22 '22 07:12

Fostah


2 Answers

Set the date of your iPad several days to the future and reopen the web app. It then reloads it correctly. After that, you can reset the date to the current date. Very odd, Apple should care about that...

like image 66
Lukas Avatar answered Dec 23 '22 20:12

Lukas


If you are using a cache manifest file, make sure to change something in the .manifest file to trigger a cache refresh.

like image 33
Sheitan Avatar answered Dec 23 '22 22:12

Sheitan