Re: Internet Explorer Caching

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



that's from php.net...
" PHP scripts often generate dynamic content that must not be cached
by the client browser or any proxy caches between the server and the
client browser. Many proxies and clients can be forced to disable
caching with:
<?php
header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past
?>

    Note: You may find that your pages aren't cached even if you don't
output all of the headers above. There are a number of options that
users may be able to set for their browser that change its default
caching behavior. By sending the headers above, you should override
any settings that may otherwise cause the output of your script to be
cached.

    Additionally, session_cache_limiter() and the
session.cache_limiter configuration setting can be used to
automatically generate the correct caching-related headers when
sessions are being used. "

On 8/29/07, Satyam <Satyam@xxxxxxxxxxxxx> wrote:
> I'm sending these headers:
>
>        header('Cache-Control: no-cache, must-revalidate'); // HTTP/1.1
>        header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); // Date in the past
>
> I don't remember where I took them from, but they are working fine for me.
>
> Satyam
>
>
> ----- Original Message -----
> From: "Richard Heyes" <richardh@xxxxxxxxxxx>
> To: "Charlene" <cwemagazines@xxxxxxxxxxx>
> Cc: <php-general@xxxxxxxxxxxxx>
> Sent: Wednesday, August 29, 2007 5:50 PM
> Subject: Re:  Internet Explorer Caching
>
>
> > Charlene wrote:
> >> I've been having problems with Internet Explorer caching php programs.
> >> I'm using the following code:
> >>
> >>        header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
> >>        header("Pragma", "no-cache");
> >>        header("Expires", "-1");
> >>
> >> And it used to work, but now, according to Windows Explorer its giving it
> >> 3 hours to expire.
> >
> > Are you sure? By default PHP pages/scripts don't send any caching headers
> > and hence don't get cached. You can check this using:
> > http://www.fiddlertool.com
> >
> > --
> > Richard Heyes
> > +44 (0)844 801 1072
> > http://www.websupportsolutions.co.uk
> >
> > Knowledge Base and HelpDesk software
> > that can cut the cost of online support
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> >
> > --
> > No virus found in this incoming message.
> > Checked by AVG Free Edition. Version: 7.5.484 / Virus Database:
> > 269.12.10/977 - Release Date: 28/08/2007 16:29
> >
> >
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
-Nate
http://swapinvites.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux