Firefox 3.0 and (ASP.NET) caching observations
Posted by: Jotekes Blog,
on 30 Jun 2008 |
View original | Bookmarked: 0 time(s)
1. Have a page with code in Page_Load
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("" & DateTime.Now.ToLongTimeString())
End Sub
2. In aspx
...
<form id="form1" runat="server">
<div>
<asp:Wizard ID="Wizard1" runat="server">
<WizardSteps>
<asp:WizardStep ID="WizardStep1" runat="server" Title="Step 1">
</asp:WizardStep>
<asp:WizardStep ID="WizardStep2" runat="server" Title="Step 2">
</asp:WizardStep>
<asp:WizardStep ID="WizardStep3" runat="server" Title="Step 3">
</asp:WizardStep>
<asp:WizardStep ID="WizardStep4" runat="server" Title="Step 4">
</asp:WizardStep>
<asp:WizardStep ID="WizardStep5" runat="server" Title="Step 5">
</asp:WizardStep>
</WizardSteps>
</asp:Wizard>
</div>
</form>
...
3. Now run the page in IE, click the links etc in the wizard and then hit Back button, IE complains that content is expired (so does FF 2 if you try with that)
4. Now run the page in FF3.0, click the links etc and then hit Back button, it just shows the previous version as if nothing is expired
Do you get the same behavior?
See also:
How to prevent Firefox 3.0 from caching
http://forums.mozillazine.org/viewtopic.php?f=25&t=673135&st=0&sk=t&sd=a
So if you have some data that you don't want to be displayable via back button, you should probably use other means than preventing the page from being cached. For example SSL (if it is really private data).
Share this post: email it! |
bookmark it! |
digg it! |
reddit! |
kick it! |
live it!