473,783 Members | 2,574 Online
Bytes | Software Development & Data Engineering Community
+ 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 2786
http://www.aspfaq.com/2022

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


"Ed Burns" <ad*****@yahoo. com> wrote in message
news:Ol******** *****@TK2MSFTNG P12.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.Expire sAbsolute = #2000-01-01#
Response.AddHea der "pragma", "no-cache"
Response.AddHea der "cache-control", "private, no-cache, must-revalidate"

dim oConn, oRS, sql
set oConn = server.createob ject("adodb.con nection")
oConn.open "Provider=sqlol edb; Data Source=dev; Initial
Catalog=pubs;Us er Id=sa;Password= dewey;"
Set oRS = Server.CreateOb ject("ADODB.Rec ordset")
sql = "select * from authors"
oRS.Open sql, oConn, adOpenForwardOn ly, adLockPessimist ic, 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'>t o 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******** ******@TK2MSFTN GP09.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.Expire sAbsolute = #2000-01-01#
Response.AddHea der "pragma", "no-cache"
Response.AddHea der "cache-control", "private, no-cache, must-revalidate"

dim oConn, oRS, sql
set oConn = server.createob ject("adodb.con nection")
oConn.open "Provider=sqlol edb; Data Source=dev; Initial
Catalog=pubs;Us er Id=sa;Password= dewey;"
Set oRS = Server.CreateOb ject("ADODB.Rec ordset")
sql = "select * from authors"
oRS.Open sql, oConn, adOpenForwardOn ly, adLockPessimist ic, 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'>t o 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
15752
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. Presently we get a "Page has expired" message. How can we avoid this? Full details: Having searched for postings on how to avoid the "Page has Expired" they are
1
1416
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 using the BACK button, but other user in the same building are not getting this message. Is there any setting or something that I can look into to solve this problem? Thanks John
2
4590
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 Here's the scenario: 1. .NET Windows Client on a remote machine makes a web service call to update tables on a Web Server running SQL Server 2000. 2. The Update is updating about 1000 - 3000 records doing simple update statements like "Update...
0
1218
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. Anybody know how to fix this problem? thanks, Amy
2
1742
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 rather than generated by the .NET compiler.) How can I change the settings so that the page never expires, or else expires only after a long time? Best regards Loane
2
1310
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 Browse-button, but only the filename, not the filepathe!). Using the Browse-button works fine, but when I just write the filename (like "test.txt") in the textbox, IE is gives me "error on page"-message in the left corner and when I click on this for...
4
3032
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> <!-- var stat =<?php echo stripslashes($status); ?>; window.status = stat;
4
16104
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 & dropdown items on search page & click on GO button then search result page open. & when i click on browser's BACK button then in IE "Web Page Expired" message dispayed & in firefox the search page dispaly. also i want when i come back to previous page...
1
2127
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 help. Can anyone point me in the right direction? I haven't really found a good way to do it.
0
10147
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10083
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
9946
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7494
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
6737
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
5379
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
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4044
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 we have to send another system
3
2877
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.