473,396 Members | 1,972 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Pressin back on browser toolbar refetches the page

<%@ Page Language="vb" AutoEventWireup="false"
Codebehind="pagexxx.aspx.vb" Inherits="pagexxx"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- #include virtual="/CommonUI/Include/Headers.htm" -->
<HTML>
<HEAD>
.....
"/CommonUI/Include/Headers.htm" has these contents:

<% Response.CacheControl = "no-cache" %>
<% Response.AddHeader( "Pragma", "no-cache" ) %>
<% Response.Expires = -1 %>
With IE, I go to page A and then to page B. Then I press back and page
A is refetched from the webserver. What I want instead, is to display
the following message to the user:

"Warning: Page has Expired"

It used to work in the past with my application , but not any more.

Anobody knows what may be wrong and how I can fix it ?

Thanx
Nov 18 '05 #1
4 1257
The message is displayed only if the page was obtained with a 'post'
method. To view this do the fallowing: from page A do a post (submit) to
the page A. After that go to page B and press back.

in*******@hotmail.com wrote:
<%@ Page Language="vb" AutoEventWireup="false"
Codebehind="pagexxx.aspx.vb" Inherits="pagexxx"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- #include virtual="/CommonUI/Include/Headers.htm" -->
<HTML>
<HEAD>
....
"/CommonUI/Include/Headers.htm" has these contents:

<% Response.CacheControl = "no-cache" %>
<% Response.AddHeader( "Pragma", "no-cache" ) %>
<% Response.Expires = -1 %>
With IE, I go to page A and then to page B. Then I press back and page
A is refetched from the webserver. What I want instead, is to display
the following message to the user:

"Warning: Page has Expired"

It used to work in the past with my application , but not any more.

Anobody knows what may be wrong and how I can fix it ?

Thanx

Nov 18 '05 #2
But that's what I do.
Anybody else can help?
Thx
bloomfield <bl********@as.ro> wrote in message news:<#9**************@tk2msftngp13.phx.gbl>...
The message is displayed only if the page was obtained with a 'post'
method. To view this do the fallowing: from page A do a post (submit) to
the page A. After that go to page B and press back.

in*******@hotmail.com wrote:
<%@ Page Language="vb" AutoEventWireup="false"
Codebehind="pagexxx.aspx.vb" Inherits="pagexxx"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- #include virtual="/CommonUI/Include/Headers.htm" -->
<HTML>
<HEAD>
....
"/CommonUI/Include/Headers.htm" has these contents:

<% Response.CacheControl = "no-cache" %>
<% Response.AddHeader( "Pragma", "no-cache" ) %>
<% Response.Expires = -1 %>
With IE, I go to page A and then to page B. Then I press back and page
A is refetched from the webserver. What I want instead, is to display
the following message to the user:

"Warning: Page has Expired"

It used to work in the past with my application , but not any more.

Anobody knows what may be wrong and how I can fix it ?

Thanx

Nov 18 '05 #3
Its because the page is not cached on the client but is retrieved every
time you make a request (including when you press the back button). The
lines
<% Response.CacheControl = "no-cache" %>
<% Response.AddHeader( "Pragma", "no-cache" ) %>
<% Response.Expires = -1 %>
are doing just that. If you remove them the page will be cached and the
browser will ask you when pressing the back button and the previous page
was obtained by a post.

Sorry i wasn't somebody else

in*******@hotmail.com wrote:
But that's what I do.
Anybody else can help?
Thx
bloomfield <bl********@as.ro> wrote in message news:<#9**************@tk2msftngp13.phx.gbl>...
The message is displayed only if the page was obtained with a 'post'
method. To view this do the fallowing: from page A do a post (submit) to
the page A. After that go to page B and press back.

in*******@hotmail.com wrote:

<%@ Page Language="vb" AutoEventWireup="false"
Codebehind="pagexxx.aspx.vb" Inherits="pagexxx"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- #include virtual="/CommonUI/Include/Headers.htm" -->
<HTML>
<HEAD>
....
"/CommonUI/Include/Headers.htm" has these contents:

<% Response.CacheControl = "no-cache" %>
<% Response.AddHeader( "Pragma", "no-cache" ) %>
<% Response.Expires = -1 %>
With IE, I go to page A and then to page B. Then I press back and page
A is refetched from the webserver. What I want instead, is to display
the following message to the user:

"Warning: Page has Expired"

It used to work in the past with my application , but not any more.

Anobody knows what may be wrong and how I can fix it ?

Thanx

Nov 18 '05 #4
The exact same pages used to work for me in the past, but not anymore.
I want to know what are the possible causes that make these directives
not to work as expected (ie return page has expired) instead of
refetching the page

bloomfield <bl********@as.ro> wrote in message news:<eE*************@TK2MSFTNGP10.phx.gbl>...
Its because the page is not cached on the client but is retrieved every
time you make a request (including when you press the back button). The
lines
<% Response.CacheControl = "no-cache" %>
<% Response.AddHeader( "Pragma", "no-cache" ) %>
<% Response.Expires = -1 %>
are doing just that. If you remove them the page will be cached and the
browser will ask you when pressing the back button and the previous page
was obtained by a post.

Sorry i wasn't somebody else

in*******@hotmail.com wrote:
But that's what I do.
Anybody else can help?
Thx
bloomfield <bl********@as.ro> wrote in message news:<#9**************@tk2msftngp13.phx.gbl>...
The message is displayed only if the page was obtained with a 'post'
method. To view this do the fallowing: from page A do a post (submit) to
the page A. After that go to page B and press back.

in*******@hotmail.com wrote:
<%@ Page Language="vb" AutoEventWireup="false"
Codebehind="pagexxx.aspx.vb" Inherits="pagexxx"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- #include virtual="/CommonUI/Include/Headers.htm" -->
<HTML>
<HEAD>
....
"/CommonUI/Include/Headers.htm" has these contents:

<% Response.CacheControl = "no-cache" %>
<% Response.AddHeader( "Pragma", "no-cache" ) %>
<% Response.Expires = -1 %>
With IE, I go to page A and then to page B. Then I press back and page
A is refetched from the webserver. What I want instead, is to display
the following message to the user:

"Warning: Page has Expired"

It used to work in the past with my application , but not any more.

Anobody knows what may be wrong and how I can fix it ?

Thanx

Nov 18 '05 #5

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

Similar topics

10
by: Tom Szabo | last post by:
Hi All, Just wondering there is any other way to remove the toolbar from the browser than using " ...toolbar=no ..." in the window.open(...)
2
by: PK | last post by:
Hello, I am looking for help on the following. I'm trying to create a custom browser toolbar button that will do a few things. One that I'm trying to do at the moment is just simply return the...
5
by: Nick Li | last post by:
Hi, I need to create a html page so that "Back" button(or some other button) is disabled in IE browser. I would appreciate your help. Nick Li
1
by: Ashvin Navare | last post by:
Hi, We want to disable BACK & FORWARD button of the browser so that user is forced to navigate through the menu options provided in the site. The browser used is Internet Explorer only. Please...
1
by: Peter D. Dunlap | last post by:
Hello, I realize that this may not be the best place to ask this question, through the application is asp.net. I also realize that questions about disabling the back button are generally met...
8
by: Jho | last post by:
Is it wise to do the following to hide html source and other info. I plan to do a popup window which would close my existing web page and popup a window in its place without toolbar and...
2
by: Liming | last post by:
Hi, I have a multiview (with 10 views inside). Now on View2, I ask the user to uplaod a file and click Save to go to View3 and once they get to view3? If the user hits my "previous" button,...
7
by: Danny | last post by:
Hello: I would like to develop a browser extension, or whatever such a thing is classified as, that would allow a user of IE6, and possibly IE7, to switch between a live and development page. ...
3
oranoos3000
by: oranoos3000 | last post by:
hi i'm a beginer javascript would you please help me i d like to findout this page has next page or previous page in history object i use this line of code if(window.history.length>0) and with...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.