New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 734056 link

Starred by 1 user

Issue metadata

Status: Duplicate
Merged: issue 652228
Owner: ----
Closed: Jun 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug



Sign in to add a comment

DevTools: Preload and Disable Cache don't play well together

Project Member Reported by fbeaufort@chromium.org, Jun 16 2017

Issue description

Google Chrome	61.0.3123.0 (Official Build) canary (64-bit)

What steps will reproduce the problem?
(1) Open DevTools and make sure "Disable cache" is checked.
(2) Go to a page that contains <link rel="preload" href="foo">
(3) Expect foo resource to be downloaded
(4) In DevTools console, execute this simple command: fetch('foo');

Is 'foo' going to be downloaded from the network or from the cache?

As 'foo' is already preloaded, it is confusing to me that the browser will actually fetch it from the network which would not happen when 'foo' is a static resource with appropriate headers.

I wish the "Disable cache" would not apply to preloaded resources as it doesn't make sense in a real world situation.

What do you think?
 
Cc: y...@yoav.ws
Preloaded resources are subject to same cache behavior as any other resource. Specifically, when the browser processes the directive and determines that it needs to fetch "foo", it (a) first goes to HTTP cache to see if there's a match, and if not, (b) initiates the network fetch. As such, when you toggle "Disable cache", you're turning off the check in (a) of the preload fetch.

Later, you're using fetch() to get the response.. If the requested resource was preloaded and is available in the memory cache, it *will* (and should) be matched with the preloaded response -- this matching is separate from the HTTP cache. So, I'd say everything is working as expected.

Is that coherent? :-)

Comment 2 by y...@yoav.ws, Jun 19 2017

Mergedinto: 652228
Status: Duplicate (was: Untriaged)
The real issue here is that `fetch()` is not fetching preloaded resources from the MemoryCache
Thanks Yoav!
Is https://bugs.chromium.org/p/chromium/issues/detail?id=735014 related as well?

Sign in to add a comment