0

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

codaddict
  • 445,704
  • 82
  • 492
  • 529
tushar
  • 307
  • 1
  • 7
  • 17
  • 1
    possible duplicate: http://stackoverflow.com/questions/3645609/reload-the-page-on-hitting-back-button [same user two hours ago] – aularon Sep 05 '10 at 11:55
  • @aularon yes the problems same but people said it was lengthy so to get more users actually read trhe problem had it shortened – tushar Sep 05 '10 at 12:03
  • did u try replacing headers with ones I suggested? if the problem persists after that: what browser are you using? – aularon Sep 05 '10 at 12:06
  • @aularon yes i did it but the result is the same and i am using safari 5 – tushar Sep 05 '10 at 12:12

1 Answers1

0

Your browser cached the previous response.

Robin
  • 4,242
  • 1
  • 20
  • 20
  • 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 Sep 05 '10 at 11:53
  • @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 Sep 05 '10 at 11:57