PDA

Click to See Complete Forum and Search --> : A question about caching!!


raladin
Jan 11th, 2004, 01:48 PM
Hi!

I want to know.. for example IE it puts the pages and that has been visited by the client.. but when he is online.. does it open the history files or directly from the web? I mean every action in the page comes from the Server directly to the browser? or from the Cache?

Waiting your answers..

And I want to know which script can stop IE from caching files.. (PHP Code)

Regards and thanks for advance..

TomGibbons
Jan 11th, 2004, 01:54 PM
Source: www.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
// Date in the past
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");

// always modified
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");

// HTTP/1.1
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);

// HTTP/1.0
header("Pragma: no-cache");
?>

This would have probably been better suited to the PHP forum (http://www.vbforums.com/forumdisplay.php?s=&forumid=27) by the way :)

raladin
Jan 11th, 2004, 01:57 PM
Thank you very very very much for your very fast reply..

But what about some SWF files in the PHP pages?? I want to block the user and not to let him download them to his PC..

So do you have any idea?

It is very important for me..

Regards,