Re: [PHP] Forcing browsers to use cached pages

2002-08-26 Thread Chris Shiflett

There is no way to force the behavior, but you can exclude the HTTP 
headers that tell the Web browser to not cache the pages.

Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache
Expires: 
etc.

I believe PHP may include some or all of these when you use session 
management. A browser that adheres to these HTTP headers will explicitly 
not cache pages, and the "no-store" directive of the Cache-Control 
header actually forbids the Web browser from even storing a copy of the 
resource. IE ignores the "no-store" directive and treats it like 
"no-cache" instead.

I believe most (if not all) Web browsers will cache resources when not 
forbidden to do so.

You should just be able to use the header() function to overwrite these 
values.

Happy hacking.

Chris

Mike Mannakee wrote:

>Hi all,
>
>Is there any way to force a browser to use a cached version of a page if the
>user hits the back button?
>
>Mike
>
>
>
>  
>



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




[PHP] Forcing browsers to use cached pages

2002-08-26 Thread Mike Mannakee

Hi all,

Is there any way to force a browser to use a cached version of a page if the
user hits the back button?

Mike



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