.NETGURU
How do you prevent a page from caching?
Messages   Related Types
This message was discovered on ASPFriends.com 'aspngcache' list.
Responses highlighted in red are from those people who are likely to be able to contribute good, authoratitive information to this discussion. They include Microsoft employees, MVP's and others who IMHO contribute well to these kinds of discussions.

Michael Bunger
Hi,

Is there a way to make a page not cache at all? I've tried setting
Duration="0" (in the <%@ OutputCache ......%> directive), but I get the
error "The 'duration' attribute must be set to a positive integer value".
There must be some obvious way to do this that I am overlooking.

Any suggestions will be greatly appreciated.

Thanks,
Michael Bunger
Reply to this message...
 
    
Juan T. Llibre (VIP)
Try :

Location="None"

best,

Juan T. Llibre
Microsoft MVP [IIS/ASP]
ASP.NET en EspaƱol : http://asp.net.do/
==============================
----- Original Message -----
From: "Michael Bunger" <Click here to reveal e-mail address>
To: "aspngcache" <Click here to reveal e-mail address>
Sent: Monday, April 01, 2002 9:27 AM
Subject: [aspngcache] How do you prevent a page from caching?

> -- Moved from [aspngfreeforall] to [aspngcache] by Charles M. Carroll
<Click here to reveal e-mail address> --
[Original message clipped]

Reply to this message...
 
    
Michael Bunger
Hi,

Is there a way to make a page not cache at all? I've tried setting
Duration="0" (in the <%@ OutputCache ......%> directive), but I get the
error "The 'duration' attribute must be set to a positive integer value".
There must be some obvious way to do this that I am overlooking.

Any suggestions will be greatly appreciated.

Thanks,
Michael Bunger
Reply to this message...
 
    
Doug Reilly
I think there may be confusion as to WHICH cache you are talking about. Are you talking about the BROWSER's cache, or the ASP.NET cache on the server? Any page with no cache directive will NOT be cached by ASP.NET.

However, the user's local browser may well cache the page (which is a totally different process). If the user's browser cache is hte issue, you can try:

Response.CacheControl = "no-cache"
Response.AddHeader "Pragma", "no-cache"
Response.Expires = -1

On Tue, 02 April 2002, "Michael Bunger" wrote:

[Original message clipped]

Doug Reilly
Click here to reveal e-mail address
See information about
Designing Microsoft(r) ASP.NET Applications at:
http://www.ProgrammingAsp.NET

Reply to this message...
 
    
Dennis West
try this http://aspalliance.com/dotnetsolutions/GetSolution.aspx?ID=11408

----- Original Message -----
From: "Michael Bunger" <Click here to reveal e-mail address>
To: "aspngcache" <Click here to reveal e-mail address>
Sent: Tuesday, April 02, 2002 8:02 AM
Subject: [aspngcache] How do you prevent a page from caching?

> -- Moved from [aspngfreeforall] to [aspngcache] by Devin
<Click here to reveal e-mail address> --
[Original message clipped]

Reply to this message...
 
 




ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
Ad


Need Dot Net Interview Questions?
Ask ExamGuru, Inc. for advice and help on Passing .Net Interviews
.Net Projects
Best-of-breed application framework for .NET projects, developed by ExamGuru, Inc. and ExamGuru IT
Free .net Help
Commission ExamGuru, Inc. and his team for your next bespoke software project
FogBUGZ
The only bug tracking system carefully crafted with one goal in mind: helping teams create great software.
Awesome Tools
If you don't know about these, you're missing out... IT Certification Questions
IT Interview Questions
Free Oracle 10g Training
MCSE Boortcamp
Cisco Study Guides
Cheap Study Guides
Exact Questions
Dot Net Interview Questions
Oracle OCP
Cheap Travel
Designer Perfumes - Wholesale Prices
Free Programming Tutorials
 
ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
 Copyright © ExamGuru, Inc. 2001-2006
Contact Us - Terms of Use - Privacy Policy - www.dot-net-guru.com - www.examguru.net - www.oraclesource.net - www.itinterviews.net - www.examguru.net/ITCertification