Forum Moderators: coopster
The properties page has a form that allows for searching on the properties. For some reason, it seems to crash sometimes. then I refresht he page, and it works fine. Can not figure it out
Here is the code for the form
<modnote>the form worked perfectly, header problem, removed large code dump as per charter, read on for solution
[edited by: jatar_k at 12:57 am (utc) on July 23, 2003]
You can add this on top to force it not to cache the page.
<?
print "Content-type: text/html\n";
print "Pragma: nocache\n";
print "Cache-Control: no-cache, must-revalidate, no-store\n\n";
?>
Hope this works.
Cheers
I looked some more and i found this header below which seems to have more details. I am not sure that the cache IS the problem, but i think it's certainly worth a shot.
<?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");
?>
That's all i could find, hope some other members have any other maybe better ideas.
?
<?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");
?>
Seems to work. Thanks very much if that was it!
I though it was the cache because when you hit f5 it did load correctly, all that with f5 does is it reloads the page again from the server, not from the cache.
(Hit CTRL-F5 a few times, if the error occurs again, it's definetly not the cache.)
I sometimes have this problem too, but only when the server is very busy and when i run "heavy" (php) applications, then it gives a 404.
I don't have a clear answer for this problem. Sorry.
<?php
session_start();
// 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");
?>