11-10-2009 01:30 PM
I am currently using the meta tags that make so the webpage has to be reloaded every time it is accessed:
<meta content="-1" http-equiv="Expires">
<meta content="no-cache" http-equiv="Pragma">
This is what I want to happen as the data on the page changes dynamically. What I want is for the javascript files to be cached though. There are quite a few files I link to that I would like to not have to reload everytime the page is visited. Is there a way to find a middle ground where the javascript is cached but the website html is not?
My page loads much faster if I take out the meta tags but then the content on the page doesn't change dynamically.
Any help is much appreciated.
Thanks!
11-10-2009 10:59 PM
You can specify different HTTP caching headers for each file served by your web server. There's a decent explanation of how this stuff works at http://www.mnot.net/cache_docs/