473,806 Members | 2,248 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Page Expiration

When the user logs out from my user page I don't want him to be able to come
bak to that page by pressing the 'Back' button of the browser.

i use this code in the page_load event
'
Response.Expire s = 0
Response.Cache. SetNoStore()
Response.Append Header("Pragma" , "no-cache")
'
It doesn't seem to work. Please suggest.
Regards,
Nitin
Nov 19 '05 #1
2 1201
Hi Nitin,

If the system time on the client is earlier than the system time on the
server (because of either the client or server having an inaccurate time
setting, or time-zone differences), setting the parameter to 0 does not have
the effect of expiring the page immediately. You can use the
Response.Expire sAbsolute property to immediately expire a page. In addition,
you can use a negative number for the Expires property to expire the response
immediately.

Response.Expire s = -1

Cheers,

Jerome. M
"Nitin" wrote:
When the user logs out from my user page I don't want him to be able to come
bak to that page by pressing the 'Back' button of the browser.

i use this code in the page_load event
'
Response.Expire s = 0
Response.Cache. SetNoStore()
Response.Append Header("Pragma" , "no-cache")
'
It doesn't seem to work. Please suggest.
Regards,
Nitin

Nov 19 '05 #2
Nitin,
U can't actually disable the BACK button.
But u can use the javascript below to do the trick
javascript:wind ow.history.forw ard(1);
Hope it helps
Patrick

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 19 '05 #3

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

Similar topics

0
1822
by: | last post by:
Which of these scenarios is better: A -- User Registers and is returned to the login screen to test his new username ie (email address). A login script checks user name against database. and asigns him a cookie id with an expiration date 30 days in the future from Date(Now). He is automaticaly redirected to his initial requested target URL.
3
1645
by: Zaccariah Kowalsky | last post by:
Hello, I have a webapp with on each page a "language" drop down list. Now, if I choose X, I want to initialise the drop down list to X. Easy to understand. But what is the best way to do this in ASP.NET? The obvious answer is, I think, the Session object. But one thing annoys me: a session can expire. It is difficult to guess the expiration time; 20 minutes, 40, 60? I just don't know. Is there a better way to pass data between pages? I...
5
1774
by: Kenneth Keeley | last post by:
Hi, I have a web app that has forms authentication and I can login to the page the first time I go there but it never times me out if I come back in 24 hours a hit the refresh key the page loads and I am still logged in. My session details are gone but I am still logged. These are the settings I am using are they right or do I need to change them? <system.web> <authentication mode="Forms">
3
2157
by: naijacoder naijacoder | last post by:
what i need i think its a session timeouts. Which i'm using like:- <sessionState mode="InProc" stateConnectionString="tcpip=127.0.0.1:42424" sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes" cookieless="false" timeout="20" />
2
1883
by: Bill Borg | last post by:
Hello all, I am working on forms authentication and trying to understand: what's the relationship between the cookie expiration and the ticket expiration? I create a cookie and I add an encrypted ticket to it. Both of these have an expiration date, but I'm not seeing how to use them. Does it make sense that these dates would ever differ? Thanks,
15
4784
by: Nathan | last post by:
I have an aspx page with a data grid, some textboxes, and an update button. This page also has one html input element with type=file (not inside the data grid and runat=server). The update button will verify the information that has been entered and updates the data base if the data is correct. Update will throw an exception if the data is not validate based on some given rules. I also have a custom error handling page to show the...
3
3292
by: Aaron | last post by:
I'm trying to parse a table on a webpage to pull down some data I need. The page is based off of information entered into a form. when you submit the data from the form it displays a "Searching..." page then, refreshes and displays the table I want. I have code that grabs data from the page using cURL but when I look at the data it contains the "Searching..." page and not the table that I want. below is the code i have so far....Thanks...
6
1237
by: Sonnich | last post by:
Hi! How do I set the timeout for a page? Session.timeout is for the sesstion AFIAK. BR Sonnich
1
1414
by: Danny Ni | last post by:
Hi, I have a page CourseEditor.aspx to allow users to modify course information. I am having problem with page expiration. Here are the steps I take to reproduce the problem: (1) I open a browser to http://localhost/CourseEditor.aspx?cid=105, then I modify the content of course 105 and save. (2) I navigate to other page by changing the url to http://localhost/CourseEditor.aspx?cid=99, without doing anything with
5
6803
by: =?Utf-8?B?Y2hlY2tyYWlzZXJAY29tbXVuaXR5Lm5vc3BhbQ== | last post by:
I have a site which I secure with forms authentication. When the user's sign on and hit one of the secure pages, I have this line in my code to ensure that the browser does not cache the page; and someone cannot navigate back to an cached image of the page in theory after the user has signed off. Response.Cache.SetCacheability(HttpCacheability.NoCache); This works all right, except when the user decides to use the browser's back...
0
9718
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9596
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10617
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9186
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6876
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
5678
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4328
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
2
3849
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3008
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.