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

Clearing Page Cache

I've found this code to help me with my session logout problem. Before I had
a session and when I logged out everything worked fine and I was brought to
the log out page but when i clicked the back button in IE I was brought back
into the cached version of the page in IE. I added the below two lines to the
page load and now the page cache is cleared and and I can check the session
variable and do the nessesary.

My problem is that this doesn't seem to work in ASP.Net version 1.0. I get
the following error.
'System.Web.HttpCachePolicy' does not contain a definition for
'SetAllowResponseInBrowserHistory'

Is there anything similar I can do in ASP.NET 1.0 to achieve the same thing.
//clear down the cache
Response.Cache.SetCacheability(HttpCacheability.No Cache);
Response.Cache.SetAllowResponseInBrowserHistory(fa lse);
if (Session["UserName"].Equals(string.Empty))
{
Response.Redirect("index.aspx");
}
Nov 22 '05 #1
0 1558

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

Similar topics

0
by: Stephen | last post by:
I've found this code to help me with my session logout problem. Before I had a session and when I logged out everything worked fine and I was brought to the log out page but when i clicked the back...
3
by: Q | last post by:
Hello, I have composed an xhtml file and corresponding css file with styles. It works OK. The problem is that I change my xhtml and css files and cannot see these changs with my browser. To see...
0
by: Robert via DotNetMonster.com | last post by:
I'm doing URL rewriting for my web site, so there is only a single phyiscal web page (Index.aspx). All other web pages I construct dynamically. This is all working fine, but I want the ability to...
6
by: Chris | last post by:
In asp we have "Response.Expires = 0" and I've tried: HttpResponse.RemoveOutputCacheItem("page location") But I can't get the page to display new. This is a problem if the data is changed and the...
0
by: Micha³ Januszczyk | last post by:
is there any way to tell whether the application has entered the shutdown state ? I put some data into aspnet cache. Special callback method is specified that should be called when cache item is...
6
by: JJ_377 | last post by:
In a "Save and Quit" button on my web app form (aspx), I have the following code that is supposed to clear a session variable (an user id) and redirect to a logon page: Session.Clear()...
0
by: PD | last post by:
I am trying to stream out a PDF file via the response object and when I execute the code it always brings up the first document that I pulled up.Even when I step through the code, I can see the new...
0
by: dimpy | last post by:
Hi everyone, I am using some big size data adapters to fill datasets to be sent to a web service. Now every time i get an error in datatype or constraints violations while filling the dataset, I...
0
by: negmat | last post by:
Hello everyone, I have the following question: I am aware that the objects currently in the cache can be viewed by issuing the following command: SELECT * FROM master.dbo.Syscacheobjects ...
0
by: Nizha | last post by:
Hi, The browser cache is not getting clearing inspite of setting these headers.. <% response.setHeader("Cache-Control","no-cache"); //HTTP 1.1 response.setHeader("Pragma","no-cache");...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
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: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
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...

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.