473,379 Members | 1,260 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,379 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 1560

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");...
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: 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: 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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.