473,386 Members | 1,864 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,386 software developers and data experts.

How can I expire a page?

I've searched the net for ways to expire a page immediately, so when the
user hit 'Back', they receive the "Page Has Expired" error page and I've
seen a number of posts on how to do it - with the code below:

<%
Response.ExpiresAbsolute = #1/1/1980#
Response.AddHeader "cache-control", "no-cache"
Response.AddHeader "pragma", "no-cache"
%>

However, when I try using this code, nothing happens, when I click 'Back',
it simply takes me back to the previous page. The "Expired Page" error page
should display, correct?

Can anyone tell me how this is supposed to be done?

Thanks,
Brian
Jul 21 '05 #1
1 1427
There are quite a few examples of how to do this on the web. Have a search
around on google for them. Check out sites like 4guysfromrolla etc.

Cheers

"Brian Patrick" <bp*********@hotmail.com> wrote in message
news:%2******************@TK2MSFTNGP12.phx.gbl...
I've searched the net for ways to expire a page immediately, so when the
user hit 'Back', they receive the "Page Has Expired" error page and I've
seen a number of posts on how to do it - with the code below:

<%
Response.ExpiresAbsolute = #1/1/1980#
Response.AddHeader "cache-control", "no-cache"
Response.AddHeader "pragma", "no-cache"
%>

However, when I try using this code, nothing happens, when I click 'Back',
it simply takes me back to the previous page. The "Expired Page" error page should display, correct?

Can anyone tell me how this is supposed to be done?

Thanks,
Brian

Jul 22 '05 #2

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

Similar topics

6
by: David Graham | last post by:
Hi I have asked this question in alt.php as the time() function as used in setcookie belongs to php - or does it belong equally in the javascript camp - bit confused about that. Anyway, can anyone...
3
by: martin | last post by:
Hi, I am storing a dataset in cache, which is happening fine. I can easily retrive it at postback from the cache, cast it to a dataset and reuse it. However I have specified that the cache...
3
by: Joey Powell | last post by:
This message was originally posted to the aspnet.security newsgroup, but no one there has ever heard of this before. That is why I am posting this message here, so that more people will see it... ...
13
by: Veeresh | last post by:
I am using .Net 1.1. How to expire an .aspx page? I think I have to use HttpCachePolicy class for this. But not sure how to use and where to this code to work. Is it in Page_load event. Thanks...
2
by: karunakar | last post by:
Hi All I dont want to expire the applicatoion Once login the application i dont want to expire the application Presently iam doing using cookies this is not working fine Please help me out ...
4
by: TCORDON | last post by:
How can I expire a page so if a user click back for example the page shows message "This Page has expired" or better yet a peronalized "Page expired" page. TIA!
23
by: Phil Powell | last post by:
// OBTAINED FROM http://www.javascripter.net/faq/settinga.htm // NOTE THAT IF YOU SET days TO -1 THE COOKIE WILL BE SET TO YESTERDAY AND THUS EXPIRE function setCookie(name, value, days, docObj)...
3
by: bbgraph | last post by:
Does anyone have a suggestion for doing this with a date function rather than the typical content=(number of seconds) function? I have an events page that I'd like to expire on a certain date and,...
2
by: Chris Davoli | last post by:
How do you expire pages so that the user can't hit the back button on his browser in Internet Explorer? I've tried the meta tag in the header that has an expires = 0 and also in vb.net...
0
by: aspineux | last post by:
setacl and getacl look to be already "Cyrus" specific (according the doc), why not to extend imaplib a little bit more ? Here are some code I wrote and tested to support cyrus "expire" that...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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...

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.