Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


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

Posted on 2010-09-16
Medium Priority
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.
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!


Accepted Solution

trippy1976 earned 2000 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…
This Micro Tutorial will demonstrate how to add subdomains to your content reports. This can be very importing in having a site with multiple subdomains.

688 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