Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
DotNet
acad.assignment.mngr
academic
adonet
aspnet
aspnet.announcements
aspnet.build.controls
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
clr
compactframework
component_services
datatools
distributed_apps
drawing
faqs
framework
framework.wmi
general
internationalization
interop
languages.csharp
languages.jscript
languages.vb
languages.vb.controls
languages.vb.data
languages.vb.upgrade
languages.vc
languages.vc.libraries
myservices
odbcnet
performance
remoting
scripting
sdk
security
setup
vjsharp
vsa
webservi.enhancements
webservices
windowsforms
windowsforms.controls
winforms.databinding
winforms.designtime
xml
  
 
date: Tue, 24 Jun 2008 02:22:00 -0700,    group: microsoft.public.dotnet.framework.aspnet.caching        back       


Cache directives ignored by Firefox   
Hi,

I add the following to my aspx page code-behind (3.5). I've tried it in 
several of the page events:

        Response.Cache.SetNoStore()
        Response.Cache.SetNoServerCaching()
        Response.Cache.SetAllowResponseInBrowserHistory(False)
        Response.Cache.SetCacheability(HttpCacheability.NoCache)
        Response.Cache.SetExpires(New Date(1900, 1, 1))
        Response.Cache.SetLastModified(New Date(1900, 1, 1))

My page has a wizard, and the browser (Firefox 3), still caches the page and 
I can use the browser back button to go to the previous wizard step, which I 
don;t want. I want it to expire (in IE it does.) ANy ideas?

Thanks
Paul
date: Tue, 24 Jun 2008 02:22:00 -0700   author:   Paul am

RE: Cache directives ignored by Firefox   
Hi Paul,

From your description, you're encountering some problem with disable 
client-side browser cache in firefox browser.  

Regarding on this, I've also performed some test on my side. Generally, the 
following code should be necessary to disable client-side cache:

=======================
   Protected Sub Page_Load(ByVal sender As Object, ByVal e As 
System.EventArgs) Handles Me.Load
        Response.Cache.SetAllowResponseInBrowserHistory(False)
        Response.Cache.SetCacheability(HttpCacheability.NoCache)
        Response.Cache.SetNoStore()
        Response.Expires = 0

        Response.Write("<br/>" & DateTime.Now.ToLongTimeString())

    End Sub
 ==============================

And my local tests showed that it works corretly for IE7 and firefox 2.0.  
However, for firefox 3.0, it does not work. I think it is due to the 
implemenation of the firefox 3. BTW, the cache control http header is a 
advisory info and the actual implemation is not mandatory and depend on the 
browser, so I suggest you also try submit this issue to firefox community 
to see whether this is an by design behavior.


Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


Delighting our customers is our #1 priority. We welcome your comments and 
suggestions about how we can improve the support we provide to you. Please 
feel free to let my manager know what you think of the level of service 
provided. You can send feedback directly to my manager at: 
msdnmg@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to 
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues 
where an initial response from the community or a Microsoft Support 
Engineer within 1 business day is acceptable. Please note that each follow 
up response may take approximately 2 business days as the support 
professional working with you may need further investigation to reach the 
most efficient resolution. The offering is not appropriate for situations 
that require urgent, real-time or phone-based interactions or complex 
project analysis and dump analysis issues. Issues of this nature are best 
handled working with a dedicated Microsoft Support Engineer by contacting 
Microsoft Customer Support Services (CSS) at 
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
>From: =?Utf-8?B?UGF1bA==?= <vis@nospam.nospam>
>Subject: Cache directives ignored by Firefox
>Date: Tue, 24 Jun 2008 02:22:00 -0700

>Hi,
>
>I add the following to my aspx page code-behind (3.5). I've tried it in 
>several of the page events:
>
>        Response.Cache.SetNoStore()
>        Response.Cache.SetNoServerCaching()
>        Response.Cache.SetAllowResponseInBrowserHistory(False)
>        Response.Cache.SetCacheability(HttpCacheability.NoCache)
>        Response.Cache.SetExpires(New Date(1900, 1, 1))
>        Response.Cache.SetLastModified(New Date(1900, 1, 1))
>
>My page has a wizard, and the browser (Firefox 3), still caches the page 
and 
>I can use the browser back button to go to the previous wizard step, which 
I 
>don;t want. I want it to expire (in IE it does.) ANy ideas?
>
>Thanks
>Paul
>
date: Wed, 25 Jun 2008 03:58:24 GMT   author:   (Steven Cheng [MSFT])

RE: Cache directives ignored by Firefox   
Thanks for your input. I logged a bug report with Mozilla.

"Steven Cheng [MSFT]" wrote:

> Hi Paul,
> 
> From your description, you're encountering some problem with disable 
> client-side browser cache in firefox browser.  
> 
> Regarding on this, I've also performed some test on my side. Generally, the 
> following code should be necessary to disable client-side cache:
> 
> =======================
>    Protected Sub Page_Load(ByVal sender As Object, ByVal e As 
> System.EventArgs) Handles Me.Load
>         Response.Cache.SetAllowResponseInBrowserHistory(False)
>         Response.Cache.SetCacheability(HttpCacheability.NoCache)
>         Response.Cache.SetNoStore()
>         Response.Expires = 0
> 
>         Response.Write("<br/>" & DateTime.Now.ToLongTimeString())
> 
>     End Sub
>  ==============================
> 
> And my local tests showed that it works corretly for IE7 and firefox 2.0.  
> However, for firefox 3.0, it does not work. I think it is due to the 
> implemenation of the firefox 3. BTW, the cache control http header is a 
> advisory info and the actual implemation is not mandatory and depend on the 
> browser, so I suggest you also try submit this issue to firefox community 
> to see whether this is an by design behavior.
> 
> 
> Sincerely,
> 
> Steven Cheng
> 
> Microsoft MSDN Online Support Lead
> 
> 
> Delighting our customers is our #1 priority. We welcome your comments and 
> suggestions about how we can improve the support we provide to you. Please 
> feel free to let my manager know what you think of the level of service 
> provided. You can send feedback directly to my manager at: 
> msdnmg@microsoft.com.
> 
> ==================================================
> Get notification to my posts through email? Please refer to 
> http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
> ications.
> 
> Note: The MSDN Managed Newsgroup support offering is for non-urgent issues 
> where an initial response from the community or a Microsoft Support 
> Engineer within 1 business day is acceptable. Please note that each follow 
> up response may take approximately 2 business days as the support 
> professional working with you may need further investigation to reach the 
> most efficient resolution. The offering is not appropriate for situations 
> that require urgent, real-time or phone-based interactions or complex 
> project analysis and dump analysis issues. Issues of this nature are best 
> handled working with a dedicated Microsoft Support Engineer by contacting 
> Microsoft Customer Support Services (CSS) at 
> http://msdn.microsoft.com/subscriptions/support/default.aspx.
> ==================================================
> This posting is provided "AS IS" with no warranties, and confers no rights.
> --------------------
> >From: =?Utf-8?B?UGF1bA==?= <vis@nospam.nospam>
> >Subject: Cache directives ignored by Firefox
> >Date: Tue, 24 Jun 2008 02:22:00 -0700
> 
> >Hi,
> >
> >I add the following to my aspx page code-behind (3.5). I've tried it in 
> >several of the page events:
> >
> >        Response.Cache.SetNoStore()
> >        Response.Cache.SetNoServerCaching()
> >        Response.Cache.SetAllowResponseInBrowserHistory(False)
> >        Response.Cache.SetCacheability(HttpCacheability.NoCache)
> >        Response.Cache.SetExpires(New Date(1900, 1, 1))
> >        Response.Cache.SetLastModified(New Date(1900, 1, 1))
> >
> >My page has a wizard, and the browser (Firefox 3), still caches the page 
> and 
> >I can use the browser back button to go to the previous wizard step, which 
> I 
> >don;t want. I want it to expire (in IE it does.) ANy ideas?
> >
> >Thanks
> >Paul
> >
> 
>
date: Wed, 25 Jun 2008 01:06:01 -0700   author:   Paul am

RE: Cache directives ignored by Firefox   
Thanks for your reply Paul,

If you got any new information, also welcome to share with us.

Sincerely,

Steven Cheng
Microsoft MSDN Online Support Lead

Delighting our customers is our #1 priority. We welcome your comments and 
suggestions about how we can improve the support we provide to you. Please 
feel free to let my manager know what you think of the level of service 
provided. You can send feedback directly to my manager at: 
msdnmg@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to 
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------

>From: =?Utf-8?B?UGF1bA==?= <vis@nospam.nospam>
>References:   

>Subject: RE: Cache directives ignored by Firefox
>Date: Wed, 25 Jun 2008 01:06:01 -0700

>
>Thanks for your input. I logged a bug report with Mozilla.
>
>"Steven Cheng [MSFT]" wrote:
>
>> Hi Paul,
>> 
>> From your description, you're encountering some problem with disable 
>> client-side browser cache in firefox browser.  
>> 
>> Regarding on this, I've also performed some test on my side. Generally, 
the 
>> following code should be necessary to disable client-side cache:
>> 
>> =======================
>>    Protected Sub Page_Load(ByVal sender As Object, ByVal e As 
>> System.EventArgs) Handles Me.Load
>>         Response.Cache.SetAllowResponseInBrowserHistory(False)
>>         Response.Cache.SetCacheability(HttpCacheability.NoCache)
>>         Response.Cache.SetNoStore()
>>         Response.Expires = 0
>> 
>>         Response.Write("<br/>" & DateTime.Now.ToLongTimeString())
>> 
>>     End Sub
>>  ==============================
>> 
>> And my local tests showed that it works corretly for IE7 and firefox 
2.0.  
>> However, for firefox 3.0, it does not work. I think it is due to the 
>> implemenation of the firefox 3. BTW, the cache control http header is a 
>> advisory info and the actual implemation is not mandatory and depend on 
the 
>> browser, so I suggest you also try submit this issue to firefox 
community 
>> to see whether this is an by design behavior.
>> 
>> 
>> Sincerely,
>> 
>> Steven Cheng
>> 
>> Microsoft MSDN Online Support Lead
>> 
>> 
>> Delighting our customers is our #1 priority. We welcome your comments 
and 
>> suggestions about how we can improve the support we provide to you. 
Please 
>> feel free to let my manager know what you think of the level of service 
>> provided. You can send feedback directly to my manager at: 
>> msdnmg@microsoft.com.
>> 
>> ==================================================
>> Get notification to my posts through email? Please refer to 
>> 
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
>> ications.
>> 
>> Note: The MSDN Managed Newsgroup support offering is for non-urgent 
issues 
>> where an initial response from the community or a Microsoft Support 
>> Engineer within 1 business day is acceptable. Please note that each 
follow 
>> up response may take approximately 2 business days as the support 
>> professional working with you may need further investigation to reach 
the 
>> most efficient resolution. The offering is not appropriate for 
situations 
>> that require urgent, real-time or phone-based interactions or complex 
>> project analysis and dump analysis issues. Issues of this nature are 
best 
>> handled working with a dedicated Microsoft Support Engineer by 
contacting 
>> Microsoft Customer Support Services (CSS) at 
>> http://msdn.microsoft.com/subscriptions/support/default.aspx.
>> ==================================================
>> This posting is provided "AS IS" with no warranties, and confers no 
rights.
>> --------------------
>> >From: =?Utf-8?B?UGF1bA==?= <vis@nospam.nospam>
>>
date: Thu, 26 Jun 2008 03:04:03 GMT   author:   (Steven Cheng [MSFT])

RE: Cache directives ignored by Firefox   
Steven,
This is displaying a confirmation message in Firefox 2.0 instead of expiring 
the page.
It's only working with IE7. 
Please let me know the way you got it working with Firefox 2.0 in your local 
testing?

Thanks!
Som.
date: Sat, 12 Jul 2008 05:39:00 -0700   author:   Somayajulu

RE: Cache directives ignored by Firefox   
Thanks for your input Som,

Yes, based on my test, it will display a message box in Firefox2 f or the 
expireing info. Actually, when I choose to continue, the page will become 
expire or I can choose not to. I assume this is the expect expire behavior 
in Firefox as I haven't found the exact same behavior(like the one in IE). 
Anyway, in firefox3 , even this behavior is not available.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


Delighting our customers is our #1 priority. We welcome your comments and 
suggestions about how we can improve the support we provide to you. Please 
feel free to let my manager know what you think of the level of service 
provided. You can send feedback directly to my manager at: 
msdnmg@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to 
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------

>Subject: RE: Cache directives ignored by Firefox
>Date: Sat, 12 Jul 2008 05:39:00 -0700
>Lines: 10

>
>Steven,
>This is displaying a confirmation message in Firefox 2.0 instead of 
expiring 
>the page.
>It's only working with IE7. 
>Please let me know the way you got it working with Firefox 2.0 in your 
local 
>testing?
>
>Thanks!
>Som.
>
>
date: Mon, 14 Jul 2008 02:31:30 GMT   author:   (Steven Cheng [MSFT])

RE: Cache directives ignored by Firefox   
http://msdn.microsoft.com/en-us/library/system.web.httpcachepolicy.setallowresponseinbrowserhistory.aspx

"When HttpCacheability is set to NoCache or ServerAndNoCache the Expires 
HTTP header is by default set to -1; this tells the client not to cache 
responses in the History folder, so that when you use the back/forward 
buttons the client requests a new version of the response each time. You can 
override this behavior by calling the SetAllowResponseInBrowserHistory method 
with the allow parameter set to true."


So, "Response.Cache.SetAllowResponseInBrowserHistory(False)" is really 
unnecessary.

"Steven Cheng [MSFT]" wrote:
> =======================
>    Protected Sub Page_Load(ByVal sender As Object, ByVal e As 
> System.EventArgs) Handles Me.Load
>         Response.Cache.SetAllowResponseInBrowserHistory(False)
>         Response.Cache.SetCacheability(HttpCacheability.NoCache)
>         Response.Cache.SetNoStore()
>         Response.Expires = 0
> 
>         Response.Write("<br/>" & DateTime.Now.ToLongTimeString())
> 
>     End Sub
>  ==============================
date: Mon, 21 Jul 2008 11:37:03 -0700   author:   Jeffrey Wang Jeffrey

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us