Bug 170716 - HTTP cache should cache regardless of status code when freshness information is available
Summary: HTTP cache should cache regardless of status code when freshness information ...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Page Loading (show other bugs)
Version: Safari Technology Preview
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-04-10 21:54 PDT by Mark Nottingham
Modified: 2017-04-12 22:47 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Nottingham 2017-04-10 21:54:32 PDT
In HTTP, the status code doesn't have much impact on caching. Specifically, if a response has an explicit freshness lifetime and there aren't any other conditions preventing caching (e.g., method, other cache directives in the request or response), the status code doesn't matter.

Spec:
  http://httpwg.org/specs/rfc7234.html#caching.overview

Allowing new status codes to be cached is important; it allows new extensions to be deployed without updating existing cache implementations.

In testing, Safari TP appears to cache some status codes, but does not cache unknown status codes (e.g., 299, 499, 599), nor does it cache 5xx-series status codes (e.g., 500, 502, 503, 504).

Chrome caches all of these status codes when they have explicit freshness information.

Tests:
  http://w3c-test.org/fetch/http-cache/status.html