473,791 Members | 3,015 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Browser caching and Back Button

I am trying to get the BACK button to re-post the request
to the server for IE 5+.

I have used,

Response.Expire sAbsolute = #1/1/1980#
Response.AddHea der "cache-control", "no_store, must-
revalidate, private"
Response.AddHea der "Pragma", "no-cache"

But it brings up a page saying that the information can
not be retrieved and then I have to REFRESH the page.

When I refresh a page it gives me a little window asking
to re-post the request, if I say yes I get the correct
behaviour.

Ideally I want the BACK button to automatically re-post
the request. However, if this isn't possible I would prefer
behaviour similar to the REFRESH button. Its more user
friendly.

Any help will be appreciated.

Thanks
Jul 19 '05 #1
1 1590
You can avoid the "re-post" question if you change the method on your form
to GET instead of POST, but you have then have to rewrite some of your logic
on the backend, since "request.fo rm" will no longer be correct.
"jim gigurtsis" <ji***********@ btinternet.com> wrote in message
news:11******** *************** ******@phx.gbl. ..
I am trying to get the BACK button to re-post the request
to the server for IE 5+.

I have used,

Response.Expire sAbsolute = #1/1/1980#
Response.AddHea der "cache-control", "no_store, must-
revalidate, private"
Response.AddHea der "Pragma", "no-cache"

But it brings up a page saying that the information can
not be retrieved and then I have to REFRESH the page.

When I refresh a page it gives me a little window asking
to re-post the request, if I say yes I get the correct
behaviour.

Ideally I want the BACK button to automatically re-post
the request. However, if this isn't possible I would prefer
behaviour similar to the REFRESH button. Its more user
friendly.

Any help will be appreciated.

Thanks

Jul 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

21
3267
by: Tony Marston | last post by:
If the use of the browser's BACK button is interfering with the operation of your web application then take a look at this article entitle "Back Button Blues" http://www.tonymarston.co.uk/php-mysql/backbuttonblues.html -- Tony Marston http://www.tonymarston.net
9
2211
by: Cyrus D. | last post by:
Hi guys, Let's say I have a page that is primarily HTML but I added a few small parts that are PHP, for example a random banner. The page is in no way PHP driven, it just has some some random stuff like the banner and/or a tip of the day. What bothers me is that the PHP page won't be cached, so if the page has a lot of links and, on average, the user clicks ten links (hitting the back button after he does that) my bandwidth usage...
13
9462
by: Kai Grossjohann | last post by:
It seems that Ctrl-N in Mozilla opens a new empty browser window. That's fine, I don't need to do anything about it. But Ctrl-N in IE appears to clone the current window. Is there a way to intercept the key so that I can do stuff on the server side to make the new window behave correctly? (We have a JSP-based webapp which stores state in the session. Now if two windows access (and modify!) the same session, then madness will result....
2
2451
by: Michael G | last post by:
Can the browser back button or browser caching be turned on or off via php? Thanks, Mike ----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==---- http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups ----= East and West-Coast Server Farms - Total Privacy via Encryption =----
3
10034
by: Rob | last post by:
Each time a webform is posted back (submitted), another URL is added to the browser's history list. My web application allows a back button to return to previously visited pages, but I do not wish to return to each Postback URL, but rather only the initial page URL. Is there a way to prevent Postback URL's from being added to the browser's history list Thanks in advance for any help.
2
587
by: Dot net work | last post by:
Hello. I have an aspx page that changes an HTML label's text using javascript. After the label's text has been changed in this way, I redirect to another aspx page. If I then use the back button on the browser, the label has lost it's newly changed value.
7
1966
by: zdrakec | last post by:
Hello all: I note in my application, that when I use Server.Transfer("somepage.aspx"), when the new page is loaded, and I click the Back button on the browser, that the previous page, when it displays, does not appear to have its Page_Load event fire. Neither does the page which I am leaving have its Page_Unload event fire. Additionally, there is a listbox on the first page that is populated based on user-selected values. This...
3
2871
by: Shimon Sim | last post by:
Hi Is it possible to make sure that the page doesn't show in browser history and won't effect Back button. The problem is that every postback shows as another entry for "Back" button and user goes through the hole history of postbacks if she wants to get to previous page. Thank you, Shimon
4
8165
by: jwlum | last post by:
I have the following problem under Internet Explorer only: 1. User fills out form data (myform.php) and clicks a button that fires myFunction() 2. myFunction() spawns a "hello, world" popup page via window.open 3. myFunction() submits the main page's form via document.form.submit() 5. User closes popup window and clicks browser's Back button to return to form entry page 6. All the form data that the user had filled out is now blank...
3
4244
by: Ian Semmel | last post by:
Is there a way to get the Page_Load event to fire if the user clicks the Back button on the browser rather than clicking a hyperlink ?
0
9669
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10427
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10155
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9029
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7537
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6776
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5431
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5559
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3718
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.