Closed Bug 995651 Opened 11 years ago Closed 6 years ago

Cache-Control for Stale Content

Categories

(Core :: Networking: Cache, enhancement, P3)

enhancement

Tracking

()

RESOLVED DUPLICATE of bug 1536511

People

(Reporter: matrix.org, Unassigned)

References

()

Details

(Keywords: dev-doc-needed, Whiteboard: [necko-backlog])

RFC 5861 defines extensions for Cache-Control of stale content. This allows the browser to serve stale content. This can improve responsiveness of websites when caches become stale as well as allow a stale version of a site to be used if it is unavailable. It defines two properties on the Cache-Control header. "stale-while-revalidate" "=" delta-seconds Allows a cache to serve stale content while refreshing itself. "stale-if-error" "=" delta-seconds Allows a cache to server stale content when the server experiences an error. While these are not used by and browsers at the moment chromium is considering adding support.[0] It would be nice to have support in firefox as well. [0] http://code.google.com/p/chromium/issues/detail?id=348877
Discussion of stale-while-revalidate on blink-dev is in this thread: https://groups.google.com/a/chromium.org/forum/#!msg/blink-dev/zchogDvIYrY/zqdQHn8fPkcJ
Whiteboard: [necko-backlog]
Priority: -- → P1
Priority: P1 → P3
Would love to see that implemented!

Is this implemented?

The developer of Boostaler https://addons.mozilla.org/addon/boostaler/ commented upon the age of this bug, and draws attention to https://dxr.mozilla.org/mozilla-central/search?q=stale. From amongst those results, I get (for example):

https://dxr.mozilla.org/mozilla-central/rev/7e40e33da3da2640e965a153254594a234231f76/netwerk/protocol/http/nsHttpResponseHead.cpp#935

Flags: needinfo?(kevincox)

I'm not implementing this. I am not aware of any work on it.

One interesting update is that chromium has now implemented stale-while-revalidate https://bugs.chromium.org/p/chromium/issues/detail?id=348877

Flags: needinfo?(kevincox)

As we just did, except the stale-if-error handling which we don't intend to implement.

Status: UNCONFIRMED → RESOLVED
Closed: 6 years ago
Resolution: --- → DUPLICATE

I can't seem to be able to find the discussion about "stale-if-error".
Do you know where it is? At least, where may I find it?

Flags: needinfo?(honzab.moz)

(In reply to brunoais from comment #8)

I can't seem to be able to find the discussion about "stale-if-error".
Do you know where it is? At least, where may I find it?

Discussed only during the necko internal meeting, no public record exists.

Flags: needinfo?(honzab.moz)

What is(are) the reason(s) for such decision?

Flags: needinfo?(honzab.moz)

(In reply to brunoais from comment #10)

What is(are) the reason(s) for such decision?

First, Chrome doesn't implement it either. Other reason is that that particular stale-if-error directive is not that beneficial as s-w-r while more complicated to implement, so the priority to implement it very low. We don't have data on actual use of that directive, tho. We could open a new bug just for s-i-e implementation, but it would be given a very low priority (P5), even for just discussing it.

Flags: needinfo?(honzab.moz)

Noted.
I think making a bug for discussion is not out of question... Who knows? maybe someone may implement for you.
If someone implements it, would you keep it?

Flags: needinfo?(honzab.moz)

(In reply to brunoais from comment #12)

Noted.
I think making a bug for discussion is not out of question... Who knows? maybe someone may implement for you.
If someone implements it, would you keep it?

If it gets a production quality, meaning to have a test and pass reviews, then probably yes.

Feel free to file the bug under Core:Networking:HTTP.

Flags: needinfo?(honzab.moz)
You need to log in before you can comment on or make changes to this bug.