IE6 back button problems
| From: | Jim McNeely | Date: | Mon, 28 Jul 2003 10:20:45 +0000 |
| Subject: | IE6 back button problems | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-157153@lists.php.net to get a copy of this message | ||
Here's a puzzler, I've searched the archives and couldn't find a satisfactory answer, and it would be nice to have one in the archives.
I'm working on a web app that draws a search screen with fields coming from settings in a database.
When you do the search, it works fine, but in IE 6 on WinXP when you hit the back button it loses the user's form field entries. This is not true of IE 5 on the mac, Safari, etc. I've tried all kinds of tweaks to the settings in IE6's internet options to no avail.
However, I think it is too simplistic to say that it is just the browser, because IE6 maintains form field entries when using the back button on some sites, like google.
All pages in the web app force a refresh by sending these headers:
##########Header Info to force refresh############
header( "Last-Modified: " .
gmdate( "D, d M Y H:i:s",
filemtime( $_SERVER['SCRIPT_FILENAME'] ) ) .
" GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, precheck=0", false);
header("Pragma: no-cache");
##################################################
I've tried commenting out some or all of these to no avail, it still loses the user's form fields.
HOWEVER, I also tried setting a test session variable to something in the search results page, and when you hit the back button in IE6 if you echo that variable on the search page it echoes the NEW value; other browsers it does NOT. So IE6 is requerying for the page without resort to a cache, while the others are using cached pages. All the header code hooie doesn't seem to affect any of this when you are talking about the back button.
TIA
Jim McNeely