473,467 Members | 1,402 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Trying to display "Page has Expired" message


Hi. I am trying to disable a user from going back to a previous page and
displaying information previously shown. I want to give them the typical
"Page has Expired" warning message. I am using Win Server 2003. Does
anyone know what you have to do so that the user can only see the page
once and not to be able to click back and see a cached page.

Thanks!

Ed
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 19 '05 #1
3 2770
http://www.aspfaq.com/2022

--
http://www.aspfaq.com/
(Reverse address to reply.)


"Ed Burns" <ad*****@yahoo.com> wrote in message
news:Ol*************@TK2MSFTNGP12.phx.gbl...

Hi. I am trying to disable a user from going back to a previous page and
displaying information previously shown. I want to give them the typical
"Page has Expired" warning message. I am using Win Server 2003. Does
anyone know what you have to do so that the user can only see the page
once and not to be able to click back and see a cached page.

Thanks!

Ed
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Jul 19 '05 #2
I tried exactly what the article said but it still does not work. It
looks like it should work. Should this page be inside of a frames page
in order to work?

The way I set up the test is that I have a page called 00.asp which has
a link to 01.asp (displayed below). 01.asp gets some records back from
the DB and outputs it. Then it displays a link to 02.asp. I follow the
link to 02.asp. Once on 02.asp I click on the back button in IE 6 and I
still get the full/cached 01.asp page and not the "Page has expired"
message. What am I doing wrong?

I did what the article said which is to use iisreset on the server and
cleared out my browser. It still does not work. Any ideas?

===============
Code: 01.asp
===============
option explicit

Response.ExpiresAbsolute = #2000-01-01#
Response.AddHeader "pragma", "no-cache"
Response.AddHeader "cache-control", "private, no-cache, must-revalidate"

dim oConn, oRS, sql
set oConn = server.createobject("adodb.connection")
oConn.open "Provider=sqloledb; Data Source=dev; Initial
Catalog=pubs;User Id=sa;Password=dewey;"
Set oRS = Server.CreateObject("ADODB.Recordset")
sql = "select * from authors"
oRS.Open sql, oConn, adOpenForwardOnly, adLockPessimistic, adCmdText

if not oRS.EOF then
do while not oRS.EOF
response.write(oRS("au_Id") & "<br>")
oRS.MoveNext
loop
end if

oRS.close
Set oRS = nothing
oConn.close
set oConn = nothing

response.write("<br><br><a href='02.asp'>to page 2</a>")
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 19 '05 #3
What has changed in 01.asp that would expect you to force it to show a page
has expired message? The page is not "not caching", it is reloading and
showing the content over again. If you want to force people to have to
actively refresh to see the content again, then in page 00.asp, post a form
instead of redirecting or clicking a link. The form can be empty.

--
http://www.aspfaq.com/
(Reverse address to reply.)


"Ed Burns" <ad*****@yahoo.com> wrote in message
news:O2**************@TK2MSFTNGP09.phx.gbl...
I tried exactly what the article said but it still does not work. It
looks like it should work. Should this page be inside of a frames page
in order to work?

The way I set up the test is that I have a page called 00.asp which has
a link to 01.asp (displayed below). 01.asp gets some records back from
the DB and outputs it. Then it displays a link to 02.asp. I follow the
link to 02.asp. Once on 02.asp I click on the back button in IE 6 and I
still get the full/cached 01.asp page and not the "Page has expired"
message. What am I doing wrong?

I did what the article said which is to use iisreset on the server and
cleared out my browser. It still does not work. Any ideas?

===============
Code: 01.asp
===============
option explicit

Response.ExpiresAbsolute = #2000-01-01#
Response.AddHeader "pragma", "no-cache"
Response.AddHeader "cache-control", "private, no-cache, must-revalidate"

dim oConn, oRS, sql
set oConn = server.createobject("adodb.connection")
oConn.open "Provider=sqloledb; Data Source=dev; Initial
Catalog=pubs;User Id=sa;Password=dewey;"
Set oRS = Server.CreateObject("ADODB.Recordset")
sql = "select * from authors"
oRS.Open sql, oConn, adOpenForwardOnly, adLockPessimistic, adCmdText

if not oRS.EOF then
do while not oRS.EOF
response.write(oRS("au_Id") & "<br>")
oRS.MoveNext
loop
end if

oRS.close
Set oRS = nothing
oConn.close
set oConn = nothing

response.write("<br><br><a href='02.asp'>to page 2</a>")
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Jul 19 '05 #4

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

Similar topics

16
by: Dave Smithz | last post by:
Hi, In summary: I want to a form to submit information via a HTTP POST, however, when using Internet Explorer I want to be able to use the back button and all the information retained....
1
by: John Good | last post by:
I have an intranet .NET web application running on my server. Everything works fine until 2 weeks ago. One of my user start to get message "Warning Page has expired" on almost every pages when she is...
2
by: Chris Langston | last post by:
I have a Web Server running IIS 5 or 6 on Windows 2K and Windows 2003 Server that is experiencing strange shutdown problems. We are using ASP.NET v1.1 and our application is written in VB.NET ...
0
by: Amy | last post by:
I have a page webform1.aspx with dropdownlist and sutopostback=true. Now if I go towebform2.aspx from webform1.aspx, then I use IE back button, I will get "Warning: Page has Expired" message. ...
2
by: Loane Sharp | last post by:
Hi there Sometimes, when I hit the <Back> button in the browser, instead of going to the previous .aspx page I get an error screen and "Warning: Page Expired". (This is a "regular" error page...
2
by: Jo | last post by:
Hi all, I've created a FileUpload in the footer of a Gridview. The only thing I want to do with this, is to pick a file with the Browse-button or to fill in a filename myself (without the...
4
by: rukkie | last post by:
Hi, I have some problems with a PHP reference in a <SCRIPTtag, but only with the Internet Explorer, which gives a "Error on page" message in the Status Bar. The code is as follows : <script>...
4
by: Sarvesh997 | last post by:
Hi, I have one problem regarding search & search results page in IE & Firefox. A code in both pages written in Php & database in MySQL Problem : When i selected one or more checkbox &...
1
by: jmacduff | last post by:
I would like to be able to display page load times within our asp.net application for debugging purposes , I am seeing some random slowness in our application and a load time metric would really...
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
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,...
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,...
1
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...
0
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,...
0
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...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.