HTML and CSS Reference
If you look in the console, you'll see that the only request the browser
made is for the manifest file:
"GET /offline-2.appcache HTTP/1.1" 200 -
In order to make the browser fetch a new version of any cached file,
the manifest needs to be updated. Any change will do. The best
approach is to add a comment with a version number:
When you reload, the edited page appears.
If you check the console, you'll see that all
the files in the manifest have been down-
Beware the browser cache
There is a certain amount of caching built into HTTP, and browsers are often con-
figured to minimize network traffic by serving pages out of local cache instead
of downloading them again. This isn't the same as having them in the applica-
tion cache; there are no guarantees or control for the web author. But the brows-
er cache can interfere with the application cache, because the browser may not
look on the network for new versions of files even if it detects that the manifest
file has been updated. In this case, the application cache is updated with files
from the browser cache. The situation is even worse if the manifest file is loaded
into the browser cache—then the user might never see your application updates.
You can avoid issues by explicitly setting caching values in the headers of your
files in the server configuration. Here's the required line for Apache:
ExpiresByType text/cache-manifest "access plus 0 seconds"
In case you missed that last part, if you want to update a single file in your
application, all the files in your application will be downloaded again.