Improve Firefox's XmlHttpRequest's HTTP caching

RESOLVED DUPLICATE of bug 428916

Status

()

defect
RESOLVED DUPLICATE of bug 428916
11 years ago
3 years ago

People

(Reporter: billhigg, Unassigned)

Tracking

Trunk
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: meta, )

Reporter

Description

11 years ago
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

Comment 2

9 years ago
You may also want to look at bug #462243
Reporter

Comment 3

9 years ago
> 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.

Comment 4

5 years ago
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.

Comment 5

5 years ago
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
Last Resolved: 3 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 428916
You need to log in before you can comment on or make changes to this bug.