Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 497843
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T05:49:14+00:00 2026-05-13T05:49:14+00:00

I’m looking for a solution to a recurring problem I have with form based

  • 0

I’m looking for a solution to a recurring problem I have with form based search results in my application.

Basically when a user searches using an HTML form and I display the results from the Database on the next page, this works perfectly.

However, when a user clicks on an individual record in the result set and then clicks “Back” on the browser, the browser asks (Firefox):

“To display this page, Firefox must
send information that will repeat any
action (such as a search or order
confirmation) that was performed
earlier.”

To give an example, a form to search a DVD collection, user searches by year, clicks on an individual movie. When the user clicks back to the search results page I don’t want the user to have to resubmit/resend that form data.

So does anyone have an idea of how to get around this?

To give you some more information I am using the POST method to submit the form and am using the following headers to stop the browser from caching the page.

Header('Pragma: no-cache');
Header("Cache-control: private, no-cache, no-store");
Header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");.

As most of the site is password protected, I don’t want the password protected side cached and be able to be brought back up after login.

Essentially what is the best way to avoid this type of browser behavior and what is the cause? Is no-cache the culprit? Should I specify an Expire time of a couple of minutes in the future from page load on the search results page?

What is the best way of approaching this as I don’t see this problem on other sites. Am I going about the no-cache part all wrong?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T05:49:14+00:00Added an answer on May 13, 2026 at 5:49 am

    Your browser is doing this because when the user clicks “back” the browser needs to post the data again in order to reload the page. One way around this is to use a GET request instead of a POST. In a GET request the form data is included/encoded in the actual URL.

    As a side note – whether using a GET or POST, you should think about whether you need to use the session in order to cache your results in order to prevent an unnecessary database call.

    P.S. Using a GET request has the great advantage that your search results pages will be bookmarkable.

    Edit: There’s some good info on forms, POST/GET requests and the differences between them here, including info on the “Redirect after Post” pattern which addresses this issue.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.