Going back to previous web page generated with a MySQL query fails in IE8

Posted on 2010-09-16
Last Modified: 2012-06-27
I have three web pages we will call page1.php, page2.php and page3.php. Page1.php has a search box and allows the user to search a MySQL database which returns results in an automatically generated table displayed on page2.php. Page2.php has code to split results into pages of 25 result per page, and code to display both "next" & "prev" links, as well as hyperlinked pagenumbers. Someone can select a link on page2.php which goes to page3.php to play the requested video file. Page3.php has an embedded player and chooses to play a file based on information passed through the URL (

The problem here is when a user selects the back button, or the javascript "return to previous" link on page3.php it goes back to "Webpage has expired" in IE8. The same pages seem to work in Firefox and in Safari on the iPhone, however it is critical it work in IE8.

I am at a loss.
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3

Expert Comment

ID: 33695619
Check this out:

In the mean time, an idea is to open the links to videos in new pages using _blank as your target for now.

Expert Comment

ID: 33695650
You could try tucking this in the top of the results page too to see what happens:

<meta http-equiv="Pragma" content="no-cache">

Author Comment

ID: 33695750
I checked your link and it is for IE4 and states that the latest version of IE fixes the problem (evidently not), it also refers specifically to ASP which I am not using, but interesting information anyway. One other fix they mention is to go into internet options and adjust a setting, I can have every potential visitor do that so that option will not work for me even if it fixes the problem on my machine.

I tried your second idea with the meta tag, did not work.

I may try opening them in a new page if no one else has any ideas, I just really hate to do that.
PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now


Accepted Solution

trippy1976 earned 500 total points
ID: 33703568
is this a secure page (https?)

Here is an article about this focused on PHP

I don't believe the issue is specific to IE8.  Your IE8 settings are probably "just right" for it to happen, but I suspect it could happen to anyone else with those exact settings on any other browser.  It appears to be due to caching.  Have you tried it using IE8 from a few other computers?

Here is the link:

Author Comment

ID: 33709932

No, this is not a secure page. I read the article you linked to and first off, I am not using sessions. Secondly, I believe the second solution is correct in that I am indeed using the $_POST command to get information for the page. The problem seems to be that the post data is lost in IE8, but not in FF.

The solution in the link you provided seems a little weird, I really don't understand why an "elegant" solution requires a third page, and what the third page really is.

Following my earlier discussion.... page1.php would contain the form, then I would pass the form off to page1a.php which would then process the form and display the data? Then what do I do with page2.php?

I could use a different method of sending the information to page2 from page1 which currently uses the POST command. The problem with that is I use a FORM to get search keywords which are then POSTed to page2 and processed from there. I am not sure how I can tell the form to pass a variable without using the POST command. Here is the current form:
   Search the short description field:<br />
   <form action="search2.php" method="post">
       Enter words to search for (leave blank to display all records):<br />
      <input type="text" name="keywords" size="20" maxlength="40" value="" />
      <input type="hidden" name="sqltype" size="1" maxlength="1" value="1" /><br />
      <input type="submit" value="Search!" />

Unless of course I used page1a to translate the POST data into GET data in the URL and could append that data to the location header? Something like this:

page1 - > keep existing form data except under action change page2.php to page1a.php
page1a - > use header('Location:\'.$ConvertedFormData.'\''); along with code to read the POST data and convert it to GET data in the URL
page2 -> convert to use GET data instead of POST data

Sound good? Can the header be below the processing code?

Author Closing Comment

ID: 33711254
I went ahead and tried it this morning and so far that seems to work fine. Here is what I did:

page1 - > keep existing form data except under action change page2.php to page1a.php
page1a - > use header('Location:\'.$ConvertedFormData.'\''); along with code to read the POST data and convert it to GET data in the URL
page2 -> convert to use GET data instead of POST data

using this code in page1a.php:
      $keywords = $_POST['keywords'];
      $sqltype = $_POST['sqltype'];
      $varpass = "?sqltype=".$sqltype."&keywords=".$keywords;

I no longer the page is expired message in IE, it still seems to work in FF, and of course it never displays anything from page1a.php. Thanks!

Expert Comment

ID: 33717228
Another possible option, if you choose to use sessions, is to have page1 submit to page2, which is not a "page" but a script.  Have it take the $_POST information and tuck it into a session variable and forward to page3, which is the results page.  Page 3 can then use the variable in session and not the post information to generate the results.

The thing with $_GET[] is that it has limits and exposes data you may not want exposed.  Also, if you're going to use GET, you could just change the method on your form I think.

Anyway, hopefully you are making progress, thank you for the points.

Featured Post

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How difficult would it be build a cookie scanner in PHP? 21 62
Pass a js value to an html form 5 42
center text in div with CSS3 2 30
Prestashop modules custimzation 2 28
When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

751 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question