I’m trying to make a appcache file but got some problems… I’ve added the appcache file to the server, here is its content:
CACHE MANIFEST
CACHE:
scripts/jquery-1.5.1.min.js
But after refreshing the page I got all my web site files missing (styles, js scripts, images etc.), I mean they are not loading anymore and browser always try to get them from local cache. But what I want is just to cache some of them, I don’t want to specify ALL my files in the appcache (to CACHE section or to NETWORK section), is this possible?
Don’t use the HTML5 app cache for what you are trying to do.
Browsers already cache certain resources from a website and you can choose how the browsers should cache the files by manipulating the HTTP headers. For example, Stack Overflow loads their jQuery library from Google and Google sets the HTTP header: “Expires: Sat, 16 Mar 2013 05:41:47 GMT”. Every website that links to this file won’t have to download it anymore because the browser will keep it in it’s cache for the next year.
For the files on your own website you will have to find out which webserver is running your site. For the Apache webserver follow these instructions, for IIS follow these instructions.