Closed Bug 443098 Opened 13 years ago Closed 6 years ago

Improve Firefox's XmlHttpRequest's HTTP caching

Categories

(Core :: Networking: HTTP, defect)

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 428916

People

(Reporter: billhigg, Unassigned)

References

()

Details

(Whiteboard: meta)

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9) Gecko/2008061015 Firefox/3.0
Build Identifier: 

We are increasingly doing more applications as web UIs with an Ajax front-end and simple RESTful HTTP backends. One of the toughest parts of writing Ajax/REST apps is that the XmlHttpRequest implementation in popular browsers doesn't conform to the HTTP spec with regards to caching directives and behavior.

Mark Nottingham's "XMLHttpRequest Caching Tests" (http://www.mnot.net/javascript/xmlhttprequest/cache.html) does a good job of pointing out the things that Firefox does right and wrong (to be fair, FF does much better than certain other browsers :-))

I may be missing some history and context, but it seems to me that over time Firefox's XHR implementation should strive to align as closely to the HTTP spec as possible, and there's currently room for improvement.

Reproducible: Always
Bugzilla is not the right place for advocacy, as you can see from the two-year delay :)

It probably would help filing specific issues with separate testcase for the most painful violations of the spec (and/or violations where we are the only non-conforming browser left) and either finding resources or persuading the drivers that fixing these violations is more important than working on other features/bugs.

Since this bug is rather unspecific, I'm morphing it to a meta bug and adding a few bugs about XMLHttpRequest caching to the dependencies.
Status: UNCONFIRMED → NEW
Depends on: 327765, 428916
Ever confirmed: true
OS: Linux → All
Hardware: x86 → All
Whiteboard: meta
Version: unspecified → Trunk
You may also want to look at bug #462243
> Bugzilla is not the right place for advocacy, as you can see from the two-year
delay :)

Thanks for the response nonetheless. Since writing this up in 2008 I've come to the conclusion that browser-level caching, content-negotiation, etc. will be quirky for the foreseeable future so we now design our apps to make things as simple as possible between the browser and first server. We optimize around server-to-server communication and server-side code where you have more control.

So in summary I'm no longer advocating for this improvement but of course would be happy if it were to happen.
The bug is still not fixed, not even on Firefox 29 Nightly.
On Chrome setRequestHeader('Cache-Control', 'no-cache') would avoid the cache and retry new XMLHttpRequest.
The problem is - nothing supported from Cache-Control sent by the user agent.
For example Cache-Control: "no-cache", Cache-Control: "max-age=0", Cache-Control: "max-age=0, must-revalidate" must avoid cache, but does not on Firefox.

Cache-Control explained in http://stackoverflow.com/questions/1046966/whats-the-difference-between-cache-control-max-age-0-and-no-cache
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 428916
You need to log in before you can comment on or make changes to this bug.