Re: Re: Web Caching...
| From: | Robert Cummings | Date: | Fri, 25 Apr 2003 23:43:57 +0000 |
| Subject: | Re: Re: Web Caching... | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-145322@lists.php.net to get a copy of this message | ||
I like to use the following:
header( 'Expires: Mon, 26 Jul 1980 05:00:00 GMT' );
header( 'Last-Modified: '.gmdate( 'D, d M Y H:i:s' ).' GMT' );
header( 'Cache-Control: no-store, no-cache, must-revalidate' );
header( 'Cache-Control: post-check=0, pre-check=0', false );
header( 'Pragma: no-cache' );
Cheers,
Rob.
--
.---------------------------------------------.
| Worlds of Carnage - http://www.wocmud.org |
:---------------------------------------------:
| Come visit a world of myth and legend where |
| fantastical creatures come to life and the |
| stuff of nightmares grasp for your soul. |
`---------------------------------------------'
Scott Fletcher wrote:
>
> Still searching the archieves for a few hours and fix the broken codes...
> Still have not found the solution to the problem about the caching
> control... As when I took a break from it and read the PHP manual about the
> php header function which then lead to another function
> 'session-cache-limiter' and found the hyperlink there that link to a website
> that is very well explain about how to use it. Like a manual of some sort.
> The hyperlink here is http://www.mnot.net/cache_docs/. From there, I found
> the cause of the problem. It said that the browser is one thing and the
> server is another thing. Since I'm using Apache, in the manual said I have
> to have it turn on on Apache for the PHP to be able to use it. It said I
> need mod_expires and mod_headers. Since I don't have that running, so the
> cache control in effect doesn't work.... That's explained why I have been
> having trouble for a few years...
>
> "Scott Fletcher" <scott@abcoa.com> wrote in message
> news:20030425155351.28588.qmail@pb1.pair.com...
> > I have noticed that the web caching doesn't work too well. If I want to
> use
> > the PHP header with the 'Pragma-Cache: no cache' (Spelling??), there come
> a
> > few problems.
> >
> > 1) Some web browsers doesn't follow this rules...
> > 2) I get the php error message because the web pages is being send out
> after
> > the PHP header..
> >
> > And so on... Any sugguestion or solution to the problem? I would really
> > appreciate it...
> >
> > Thanks,
> > FletchSOD...
> >
> >
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php