Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

AutoRefresh previous page?

Status
Not open for further replies.

Apollo6

Technical User
Jan 27, 2000
418
US
I have page1 that loads a dropdown from executing a query. The user selects an item in the dropdown and the next page is loaded with the corresponding data. When the user clicks the Back button on the browser, I get the page has expired screen and the user has to click refresh to see the page that has the dropdown. I am using the POST method throughout and wanted to know if there is a work-around for this.

Thanks for any suggestions.
 
You can try messing with expiry headers using meta tags, but I can't say I have tried this. You can always ask users to not use the back button. :p Try this:
<meta http-equiv=&quot;Expires&quot; content=&quot;Sun, 27 June 2004 21:29:02 GMT&quot;>

Note it is purposely in the future. That should force the browser to think the page hasn't expired yet. Though, not all servers let you do this, and not all browsers will obey this. This may even have an adverse side effect of constant caching of that page.

I am Comptia A+ Certified
 
No luck... The app will be mainly used on IE or Netscape 7.0. What is odd is that I have other scripts that execute queries to fill dropdowns and they don't have this problem. On the other apps, the user just clicks the back button on the browser and the page loads the same as is was before. I'm using POST method on them as well... Has to be something. Thanks for the suggestion.
 
this is a cache problem, ur browser by default clears cache.
therefore the &quot;Back&quot; does not work. can i have the script for the back button? and can i have the language u r using (ASP/PHP/...)

Known is handfull, Unknown is worldfull
 
If a page is displayed via a POST then browsers won't cache it. I would guess in this case that your previous page was also reached via a POST. If so then you're out of luck -- the browser will want to submit the POST data (that was originally submitted for the previous page) and won't do so automatically, nor, it seems, will it cache it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top