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

force page expire?

Hello - is there a way to make it so that when users
press "back" button IE will show "Page Expired", or
similar message, or force browser to submit another
request to the server so I can handle it? Thanks!
Nov 17 '05 #1
2 4693
You can do that with this code:

Response.Expires = 0
Response.Cache.SetNoStore()
Response.AppendHeader("Pragma", "no-cache")

--
I hope this helps,
Steve C. Orr, MCSD
http://Steve.Orr.net
Hire top-notch developers at http://www.able-consulting.com

"szabelin" <szabelin@szabelin> wrote in message
news:05****************************@phx.gbl...
Hello - is there a way to make it so that when users
press "back" button IE will show "Page Expired", or
similar message, or force browser to submit another
request to the server so I can handle it? Thanks!

Nov 17 '05 #2
Hello Steve, thank you for replying. Is there a way though
to set these back to the original values? In my case they
are changing database connection, so I want to wipe out
session keys, and not allow them to go back to data page
(cause results are now from another database), but once
they are on with a new connection established - I want
things back to normal. Thanks!

-----Original Message-----
You can do that with this code:

Response.Expires = 0
Response.Cache.SetNoStore()
Response.AppendHeader("Pragma", "no-cache")

--
I hope this helps,
Steve C. Orr, MCSD
http://Steve.Orr.net
Hire top-notch developers at http://www.able- consulting.com
"szabelin" <szabelin@szabelin> wrote in message
news:05****************************@phx.gbl...
Hello - is there a way to make it so that when users
press "back" button IE will show "Page Expired", or
similar message, or force browser to submit another
request to the server so I can handle it? Thanks!

.

Nov 17 '05 #3

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

Similar topics

1
by: Piyush Parmar | last post by:
Hi. I would like to know if it's possible to force a dialog box to "expire" after so many seconds? The scenario is that I'm holding various objects in my session. Before it times out, I want...
2
by: James | last post by:
I've been to websites where if I navigate off a form, trying to get back to it by hitting the back button gives me a page which says "Warning, page has expired". It doesn't display the page. I've...
1
by: Mohammad Samara | last post by:
Hello everyone, Is it possible to kill the Application session on website leave event? i.e using "FormsAuthentication.SignOut()" when changing the web site by entering a different domain name in...
2
by: Edward Chung | last post by:
I create a user control that is used as a page header for all application's pages. The user control contains a HyperLink control named accountHyperlink whose text can either set to...
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!
0
by: J | last post by:
Here is the code that I tried with no luck. Even though the cache is not saved, the page still appears but goes to the server to get the page instead of local cache. When it comes back to the...
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,...
0
by: Summercool | last post by:
right now i have a script that will add to the DOM tree of a form... adding the hidden input values as children... it works well except when i click "BACK", Firefox doesn't remove those objects......
3
by: =?Utf-8?B?T2xlZw==?= | last post by:
Using ASP.NET 2.0 I always thought that cache has a global scope in the web application. Is it possible to save an object to the page cache so it's not in the application scope? And if I set...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...

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.