views:

47

answers:

1

test1.php has this code

(
<?php
header("Cache-Control: no-cache");
header("Pragma: no-cache");

$a=date("D M Y ; h:m:s");


echo $a;

?>
<html>
<head>
<meta http-equiv='Pragma' content='no-cache'/>
<meta http-equiv='Expires' content='-1'/>
</head>
<a href="test2.php">tk</a>
</html>
)

then when i visit test1.php and move to test2.php then on pressing back button why is it not displaying the current time instead displaying the time i last visited it. its a simpler version of my previous problem

A: 

Your browser cached the previous response.

Robin
Please read the entire question, including the most important part here, the code. He's attempting to set the cache control headers, the question isn't what's happening, it's *why* it's happening.
Nick Craver
@nick yes thats exactly what i am asking here and thanks for letting me know about the accepting answers part wasnt aware of that .did accept the answrers to previous questions now
tushar