Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Trying to display "Page has Expired" message

Reply
Thread Tools

Trying to display "Page has Expired" message

 
 
Ed Burns
Guest
Posts: n/a
 
      08-05-2004

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!
 
Reply With Quote
 
 
 
 
Aaron [SQL Server MVP]
Guest
Posts: n/a
 
      08-05-2004
http://www.aspfaq.com/2022

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




"Ed Burns" <> wrote in message
news:...
>
> 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!



 
Reply With Quote
 
 
 
 
Ed Burns
Guest
Posts: n/a
 
      08-05-2004
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!
 
Reply With Quote
 
Aaron [SQL Server MVP]
Guest
Posts: n/a
 
      08-05-2004
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" <> wrote in message
news:...
> 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!



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Display a picture for say 5 seconds and then display a message. Mufasa ASP .Net 6 07-26-2007 11:09 PM
Trying to display LastModified Data. Kenneth Keeley ASP .Net 0 04-13-2005 01:26 AM
rendering PDF and trying to display a message David Cho ASP .Net 2 03-11-2005 06:10 PM
Trying to display the decimal...can someone help? TN Bella ASP .Net 3 06-22-2004 12:57 PM
Trying to display a message if there is nothing available J. Muenchbourg ASP General 4 11-25-2003 09:59 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57