I\'ve been developing a pretty complicated HTML5
web app for the past month. Last night my iPhone
suddenly decided to cache all JS, CSS, and images an
For what it's worth, and it's not a perfect solution, we had to settle with appending query strings. I've written a shell script to make this and a few other tasks bit more automated, you can look at the source on GitHub. A few details:
script_order.txt
and compiles them with Google's Closure Compiler<script>
tags that have a ?v=timestamp
appended to the script filenames. If you're working with static HTML and can't include a PHP file, you could rewrite the output to append the script tags to your index.html file.Another pretty hacky solution would be to save your JS/CSS with a .php
file extension, and in those files set the headers to something like this:
<?php
header("content-type: application/javascript");
header('Cache-Control: no-cache');
header('Pragma: no-cache');
?>
window.alert('hello world');
EDIT:
Setting the date to 2, 3 or 4 days in the future, start the app from homescreen and then set the date back to normal also can do the trick.