0

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?

2
  • What are you actually trying to achieve? It seems you are using the cache manifest for the wrong purpose. Commented Mar 18, 2012 at 11:57
  • I want to cache some of static files on users side (like jquery, css styles, pictures etc.), I found this appcache file usefull for that reading html5 possibilities Commented Mar 18, 2012 at 14:45

1 Answer 1

2

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.