Re: no reload

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

 



Usually such things aren't cached implicitly on the server side. However, they are very often cached by your ISP! That cache is hard to circumvent, and the difference between the two is unnoticable for a normal user.

When you change the path, then, of course, they are treated as new files, and your ISP will, again, re-cache them, unless specific headers (pragma or cache-control) are set.


Ron wrote:

Yes - my problem *was* on the server side, and not on the client.
I don't know what the problem was, but the files were in a soft linked folder. I moved them to my apache docroot and it solved the problem.
Thanx,
Ron



Gal wrote:

Yes, they do control the browsers cache.
You can use the Mozilla "Live HTTP Headers" extension to see what do you send/recieve.
Check http://livehttpheaders.mozdev.org


Very good tool.

Cheers,
Gal



Ron wrote:

Thanx,
but... don't the headers control the browser's caching?


Gal wrote:

add the following headers.
Important: Make sure they are located in your script before you print to the browser !!!


<?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");
?>

Cheers,
Gal

Ron wrote:

Hi,
In working locally (Linux, Apache/2.0.49, PHP4.3.4) I can not reload the scipt pages.
When I hit the reload button, the same page is displayed.
I tried to use another browser - and it seems the page is cached on the server side.
Any clue how to disable that?
Cheers,
Ron

-- 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