how to cause a page to work with the most up to date content

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
davidklonski
Forum Contributor
Posts: 128
Joined: Mon Mar 22, 2004 4:55 pm

how to cause a page to work with the most up to date content

Post by davidklonski »

Hello

I have two files.
one.php and two.html
one.php leads to two.html via a link.

one.php has some php code that runs at the top of the page.
When the user clicks on the link and goes to two.html and then clicks on the 'back' arrow in the browser, one.php is displayed again, but the php code in that page doesn't run again. Instead the page is rendered from the browser cache.

I have set the following tags in one.php:

Code: Select all

<?php header("Cache-control: private"); // IE 6 Fix. ?>
<meta http-equiv="Cache-Control" content="no-cache, must-revalidate">
<meta Http-Equiv="Pragma" Content="no-cache">
<meta Http-Equiv="Expires" Content="0">
This doesn't help.
Is there a way to cause the page to be always parsed even though the user used the navigation arrows to reach it?

thanks in advance
Post Reply