Closed Bug 104181 Opened 24 years ago Closed 24 years ago

SH should not store layout state if server sends 'Cache-control: no-cache'

Categories

(Core :: Networking: HTTP, defect, P1)

x86
Windows NT
defect

Tracking

()

RESOLVED FIXED
mozilla0.9.6

People

(Reporter: radha, Assigned: darin.moz)

References

Details

(Whiteboard: [PDT+])

Attachments

(4 files, 1 obsolete file)

nsIHTTPChannel or nsICachingChannel should have methods that will enable docshell/session history or any module to inquire about cache specific headers passed by the server. Something like, nsIHttpChannel::IsNoCacheResponse(). This is required for bug 104162 and 99692
Severity: normal → critical
Priority: -- → P1
Target Milestone: --- → mozilla0.9.6
*** Bug 99692 has been marked as a duplicate of this bug. ***
Status: NEW → ASSIGNED
Summary: nsIHTTPChannel needs methods to access cache specific headers → need nsIHttpChannel::isNoCacheResponse to determine if SH should store layout state
ok, this patch makes it so that session history won't remember layout state when a http server excepts that its response will not be reused by the browser to satisfy subsequent normal loads (this also includes back/forward, in order to be consistent with existing web browsers).
Comment on attachment 53187 [details] [diff] [review] v1.0 patch -- makes docshell use this method as well sr=rpotts@netscape.com I'm assuming that this 'caching' is HTTP specific and shouldn't apply to other nsICachingChannels...
Attachment #53187 - Flags: superreview+
for the time being, yes.. it is specific to HTTP.. however, in the future it might make sense to revisit this, and come up with an attribute on nsICachingChannel that would "be" this for HTTP.
Comment on attachment 53216 [details] [diff] [review] v1.1 revised patch -- forgot one very important check in IsNoCacheResponse sr=rpotts@netscape.com hey it looks even better now :-)
Attachment #53216 - Flags: superreview+
r= radha Darin: I presume the following line in nsHTTPChAnnel.cpp mResponseHead->Revalidate(); will take care of pragma: no-cache and cache control:no-cache
So, if Radha's right, we're flushing form fields away with both mechanisms of using no-cache, both from Cache-Control directive and Pragma directive?
nsbranch+ per Arun, Radha and Darin, and let's talk about it on monday.
Keywords: nsbranch+
Whiteboard: [PDT]
Comment on attachment 53311 [details] [diff] [review] v1.2 simple/minimal patch to make us consistent with IE6 this patch is incorrect
Attachment #53311 - Flags: needs-work+
Attachment #53311 - Attachment is obsolete: true
tentative PDT+, for revised one line path, subject to positive reviews, and mscott's nod, and wink </*^)
Whiteboard: [PDT] → [PDT+]
these are two minimal patches, which solve this problem, and make mozilla consistent with the behavior of IE wrt its Back/Forward form history behavior. the patch for the 0.9.4 branch requires radha's patch to bug 96230.
Comment on attachment 53330 [details] [diff] [review] v1.4 simple/minimal patch for trunk sr=rpotts@netscape.com
Attachment #53330 - Flags: superreview+
Comment on attachment 53332 [details] [diff] [review] minimal patch for 0.9.4 branch sr=rpotts@netscape.com
Attachment #53332 - Flags: superreview+
r= radha I tried the latest patch on sites with no-store, no-cache and pragma: no-cache sites. We are now completely in conformace with IE5.x, but we don't conform with NS4.x in any way. NS 4.x seems to work in full favor of Pragma: no-cache, which we don't recognise as much in 6.x.
yes, 4.x does not know about the HTTP/1.1 Cache-Control header.
rolling the dice, with my bet on Darin and mscott ... let's get this one in tonight.
patch 53330 checked in on the trunk patch 53332 checked in on the 0.9.4 branch resolving FIXED
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Summary: need nsIHttpChannel::isNoCacheResponse to determine if SH should store layout state → SH should not store layout state if server sends 'Cache-control: no-cache'
verified on 0.9.4 branch - http/forms/cache consistant with IE 5.5 10/15/01 builds mac osX, Linux rh6, Win NT4
Keywords: vtrunk
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: