Page 1 of 1

about refreshing page

Posted: Thu Jul 15, 2004 5:39 am
by bugthefixer
i have once posted this topic before but i could not fix my problem. my problem is when i click o a link for the first time then it doesnt cause any problem but when i click for the second time it gives me the page without refreshing it same as i click on it for the first time but when i click it for the third time then it gives me refreshed page.
my page actually show databae contents so during my first and second click if i chenge my databse it shows me previous records but if i click for the third time then it gives updated record.
anybody can tell me how can i resolve this issue.

Posted: Thu Jul 15, 2004 6:52 am
by malcolmboston
sounds to me like a caching problem

try this code in the <head></head> of your page

Code: Select all

<META HTTP-EQUIV="Cache-Control" CONTENT ="no-cache">
or for netscape

Code: Select all

<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
Hope im on the right track.

Good Luck

Posted: Sat Jul 17, 2004 2:32 am
by bugthefixer
well i did as you directed i mean i added

<META HTTP-EQUIV="Cache-Control" CONTENT ="no-cache">

but it didnt work.. is there any other idea

add

Posted: Sat Jul 17, 2004 3:15 am
by fresh
a refresh to the page after the script parses like so:

Code: Select all

<?php
some stuff

echo "<script>window.reload(true)</script>";
?>
something like that... hope this helps :)

Posted: Sat Jul 17, 2004 6:21 am
by anjanesh
Add this in the FIRST line of your page :

Code: Select all

<?php 
header("Cache-Control: no-store, no-cache, must-revalidate"); 
?>