Page refresh

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
aetoc
Forum Commoner
Posts: 37
Joined: Tue Jan 31, 2006 2:48 am

Page refresh

Post by aetoc »

I wonder if you know any way (php or html code) to block the browser to cache a page.

I have 2 pages the first one (list.php) displays the query results. If i delete a record I pass all the vars to the second page (update.php). The update.php delete the records and redirects thw browser to the list.php. All works perfect until this step.

If I go somewhere else in the site and then go back the list.php will display the records that I have delete. If I refrsh it (right click -> refresh) displays e the right results.

I hope you understand what I have write.

P.S. The list.php and update.php works in iframe. The iframe is called in the index.php.
Grim...
DevNet Resident
Posts: 1445
Joined: Tue May 18, 2004 5:32 am
Location: London, UK

Post by Grim... »

Put this in your PHP code before you output any HTML data (right at the top of your page):

Code: Select all

header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header('Pragma: no-cache');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
[edit]Don't mention it...
Post Reply