Open Bug 1576297 Opened 5 years ago Updated 2 years ago

Add a web console warning when discovering a cross-origin prefetch resource if HTTP cache partitioning is turned on

Categories

(Core :: DOM: Core & HTML, task)

task

Tracking

()

People

(Reporter: ehsan.akhgari, Unassigned)

References

Details

(Keywords: dev-doc-needed, site-compat)

With HTTP cache partitioning, prefetching cross-origin resources isn't very useful, so we should probably add a web console warning.

See also the discussion at https://github.com/w3c/resource-hints/issues/82. It's not entirely clear to me if this feature still has a use in this brave new privacy-first world. (That is, how often is it used for same-origin navigations?)

Yeah that's a good point.

Keywords: site-compat

Tim, is this something you can look into?

I guess there are two questions here, is the prefetch code actually taking into account the partitioned principal and could we add a warning? We might even want to consider removing support for cross-origin resources altogether as it'll just waste bandwidth.

I somehow thought we had dropped support or never supported this, but that doesn't seem to be the case.

Flags: needinfo?(tihuang)

(In reply to Anne (:annevk) from comment #3)

Tim, is this something you can look into?

I guess there are two questions here, is the prefetch code actually taking into account the partitioned principal and could we add a warning? We might even want to consider removing support for cross-origin resources altogether as it'll just waste bandwidth.

Yeah, I can look into this issue.

We have partitioned the prefetch in Bug 1646136. but I am not sure if it's possible to add a warning for this. Will dig into that.

I somehow thought we had dropped support or never supported this, but that doesn't seem to be the case.

I have a question about removing the prefetch for cross-origin resources. Isn't the prefetch still provide benefits for third-party resources? The third-party resources could still be prefetched and put into the partitioned cache. And the cache can still be used for getting the third-party resource later, right?

Flags: needinfo?(tihuang) → needinfo?(annevk)

Yeah, I suppose that's right. I had forgotten it also works for subresources that are used by the document being navigated to next. (There's not really a proper specification for this feature unfortunately.) But that would only work if that document has the same partition.

I'm not sure then if we want a warning here as it might just become noise.

If anything we probably want to have telemetry on how often this is used successfully, but that does not seem like a priority.

I guess from my point of view we can wait a bit here and see what kind of feedback we get, but happy to hear more thoughts.

Flags: needinfo?(annevk)
Keywords: dev-doc-needed
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.