New issue
Advanced search Search tips

Issue 641341 link

Starred by 2 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Task

Blocking:
issue 641327



Sign in to add a comment

Handle no-store responses for LOAD_PREFETCH requests

Project Member Reported by droger@chromium.org, Aug 26 2016

Issue description

A request that is tagged with LOAD_PREFETCH is not intended to be used directly, and is only useful if it goes in the cache.

However, if the response has a no-store header, I believe that the current behavior is to download it and then drop it on the floor. This seems sub-optimal.

Example of better behaviors are:
1) cache these no-store responses (with all the caveat of caching no-store resources)
2) cancel the request as soon as the no-store header is seen.


Note: this bug may overlap with other work related to NoStatePrefetch (e.g. bug 641327) and back navigations. Feel free to tag it as duplicate if this is more appropriate.
 
Cc: zhongyi@chromium.org
CCing Cherie since it's tangentially related (through a recent discussion) to the work she's doing with making HTTP/2 push more cache aware.  

Cherie: This isn't directly relevant to what you're doing, but it's part of the whole preload/push/no-store caching question we discussed last week, and I don't know of a narrower place where no-store caching issues are being discussed, so I'm casting a wide net.  Feel free to ignore.

Components: -Internals>Network Internals>Network>Cache Internals>Network>HTTP
We should probably take the design discussion to net-dev@, but yes, the description of the current behaviour sounds correct, and doing #2 (drop the request) also sounds correct.

The broader question is whether we should be using flags like LOAD_PREFETCH to signal the "cache but don't use" behaviour. It's seems quite weird to have the //net layer indirectly, tangentially aware of the "pull into cache" semantics of prefetch, while still requiring the full consumer interface (of a URLRequestContext).
+1 to that....the LOAD_PREFETCH stuff in net/ seems pretty weird to me, too.  And is there some sort of arbitrary freshness timer in net/ as well, to prevent really stale resources via that path?
Yes, #2 seems strictly better than the current state.

However a way to do #1 might also be interesting for NoStatePrefetch, although I don't really have clear metrics about how important this is for now.
I've also seen it mentioned in the context of improving back navigations.

Comment 5 by mmenke@chromium.org, May 16 2018

Labels: -Type-Bug Network-Triaged Type-Task

Comment 6 by mmenke@chromium.org, May 23 2018

Components: Internals>Preload
Components: Internals>Network
Components: -Internals>Network>HTTP
Status: Available (was: Untriaged)

Sign in to add a comment