Re: Caching
| From: | דניאל דנון | Date: | Fri, 10 Apr 2009 18:42:06 +0000 |
| Subject: | Re: Caching | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-291347@lists.php.net to get a copy of this message | ||
Hey! About " Header set Expires "Thu, 15 Apr 2010 20:00:00 GMT" "
The problem is the files might change, lets say - every week. How can I use
" Header set Expires "Thu, 15 Apr 2010 20:00:00 GMT"" to something like
Header set Expires "today plus week"
(or X seconds / y minutes / etc...)
On Fri, Apr 10, 2009 at 12:15 PM, Richard Heyes <richard@php.net> wrote:
> 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)
>