Im not to formiluar with Cache Control. This is probably the first time I heard of it. What does it have to do with pressing the back button and the previous page still being displayed.
Im Using One document. Every piece of Content on that document is wrapped in a IF statement
The following is not actual script, just a concept of how my pages are setup
<?php if ($_GET['admin'] == 1){ ?>
<div id="loginpage">
SHOW LOGIN PAGE. IF the password is Valid. then the URL varible admin is set to 2 and the page is refreshedand the if statement that == 2 is now executed. any other if statements are ignored.
</div>
<?php }?>
<?php if ($_GET['admin'] == 2){ ?>
<div id="Menu">
<a href="admin.php?admin=3">NEW PRODUCT</a> <a href="admin.php?admin=4">NEW CATEGORY</a>
SHOW ADMIN MENU FOR SELECTING STUFF. once again. if a user clicks on a link then the page refreshes with the value of admin == something different.
</div>
<?php }?>
<?php if ($_GET['admin'] == 3){ ?>
<div id="NewProd">
A form to make a new product
</div>
<?php }?>
<?php if ($_GET['admin'] == 4){ ?>
<div id="NewCategory">
Make a new Category
</div>
<?php }?>
Now say Im on the login screen. And I sign in. its going to compare my password with the password in MySQL. if all is RIGHT then it is going to set the URL varible ADMIN = 2. the page basically refreshes but this time with the ADMIN varible being 2. so the IF statement that = 2 is going to start functioning. Within those tags, all the menu content is displayed. now lets say I click back to try to go to the login screen again. or lets say I click on a link that sets the URL varible admin to 3 or 4. Its going to refresh the page and the IF statement that = 3 or 4 is going to funciton and display the right kind of content. again lets say I click back. then thats when I get
Warning: Page has Expired The page you requested was created using information you submitted in a form. This page is no longer available. As a security precaution, Internet Explorer does not automatically resubmit your information for you.
To resubmit your information and view this Web page, click the Refresh button.
Now if I click refresh then the page appears again. GREAT sweet. But I dont want my users to go through hell or just be plain annoyed by the error messege. Of course i could create a BACK link. But I as a web surfer tend to use the BACK button alot, so I feel that I should make it fair for all the people out there that love using the back button and forward button to navigate pages. Is there any possible way fixing this problem.
I understand what you are trying to say, its a great tip and all, but before I go that far, I would like to know if there is anything more specific towards fixing this issue.