Re: Caching
| From: | Richard Heyes | Date: | Fri, 10 Apr 2009 09:15:18 +0000 |
| Subject: | Re: Caching | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-291328@lists.php.net to get a copy of this message | ||
Hi,
> I started caching some of the static files on my application,
> I was wondering - Lets say I have an article on my website and I *want* to
> cache it. How will I cache it AND will be able to make my visitors
> "re-cache" it if it has been changed?
Work from the last modified date/time on the file. When you update the
file it will change. Though if your files really are static, then
there's little point - the OS will do a far better job of caching them
than you will.
Also, you may also want to have a goosey at the Cache-Control: HTTP
header over Expires:. It can give you more control.
> How do I use *Header set Expires* (on htaccess) and specifying "in a week"?
A quick Google found this:
Header set Expires "Thu, 15 Apr 2010 20:00:00 GMT"
--
Richard Heyes
HTML5 Canvas graphing for Firefox, Chrome, Opera and Safari:
http://www.rgraph.net (Updated March 28th)