Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prefetch request changes to improve privacy #398

Closed
2 of 5 tasks
domfarolino opened this issue Jul 30, 2019 · 13 comments
Closed
2 of 5 tasks

Prefetch request changes to improve privacy #398

domfarolino opened this issue Jul 30, 2019 · 13 comments
Assignees
Labels
Missing: explainer Missing: security & privacy review Mode: none Does not require TAG review Priority: low Review type: CG early review An early review of general direction from a Community Group Topic: fetch and preload Things that live on top of (but close to) networking. Topic: HTML Topic: privacy Venue: WHATWG

Comments

@domfarolino
Copy link

domfarolino commented Jul 30, 2019

こんにちはTAG!

I'm requesting a TAG review of:

Further details:

You should also know that: Only early discussion has been going on regarding the changes to prefetch requests, and their processing model (HTML Standard PR above). We, Chrome, thought it would be best to request a TAG review early on as we're interested in making these changes in order to better-preserve privacy on the web platform. This is Blink's Intent thread. At the time of writing, the total compatibility effects of these changes are unknown, however we intend to experiment with an initial implementation. There has been some discussion from Apple regarding these changes as well.

We'd prefer the TAG provide feedback as:

  • open issues in our GitHub repo for each point of feedback
  • open a single issue in our GitHub repo for the entire review
  • leave review feedback as a comment in this issue and @-notify [github usernames]
@FredKSchott
Copy link

FredKSchott commented Aug 10, 2019

Context: I was asked to comment here by @kenchris. I created and operate https://pika.dev/cdn.

Edit: Posted in the wrong place, moved to blink-dev

Context: I was asked to comment here by @kenchris. I created and operate https://pika.dev/cdn.

How are cross-origin CDNs considered in this change? My understanding is that this suggested change would kill the cache efficiency story of cross-origin CDNs, which is extremely troubling.

The ability to cache resources across domains is a huge benefit to using cross-origin CDNs at scale. The more use that they get, the more likely cache hits are, and the faster those websites become (potentially faster than if they'd served their own JS). Two examples:

1. "This month, July 2019, cdnjs served almost 190 billion requests ... Lodash (4.17.11) skyrocketed to the top of the list this month with 8.7 billion requests."[1]
I imagine the cache efficiency lost due to this change for this CDN alone (jQuery, lodash, etc) will be massive.

2. "Approximately 100% of the Fortune 500 already use npm to acquire approximately 97% of their JavaScript code." [2]
Pika is creating a CDN for modern npm packages that can run in the browser. The project is only a few months old today, but with ESM it becomes feasible for sites to load their npm dependencies from our CDN (or UNPKG, or another cross-origin CDN like it) in production. Basically, cdnjs for npm. In that world, every npm package would only be loaded once across all participating sites, and would then be cached and reused on future visits. Imagine if most sites never had to load React, ReactDOM, Preact, Vue, the 100 most popular npm packages, etc.

Obviously security is a huge concern, and I completely understand and appreciate the work being done here. But as others have pointed out the perceived threat (cached file detection) doesn't outweight the serious performance hit for CDNs.

As we moved towards bundling all of our JavaScript into custom site bundles over the last decade, cross-origin CDNs have gone out of fashion. But they clearly are still heavily used today (see cdnjs stats above), and we see them playing a big part in the future of the web once ESM becomes standard... as long as the current performance story isn't destroyed.

tldr: https://twitter.com/rektide/status/1156261839623401472

(PS: Please add that single explainer doc! I read through the different threads but there's a chance I could have misunderstood/missed something, in which case please let me know!).

@yutakahirano
Copy link

yutakahirano commented Aug 13, 2019

@FredKSchott, Is your comment for double-keyed HTTP caching in general, or for this change specifically?

@FredKSchott
Copy link

Double-keyed HTTP caching in general. I'd originally read the PRs to be addressing that generally, but in re-reading I see that you're talking exclusively about prefetching logic.

@domfarolino
Copy link
Author

Yeah, so this issue and the Blink intent thread I posted. Concerns about Double-Key Cache in general should probably be brought up in Blink's intent thread for that change specifically, until a TAG review for it has been started. The thread's been pretty active so feel free to comment.

@lknik lknik self-assigned this Aug 15, 2019
@lknik lknik added this to the 2019-09-04-telecon milestone Aug 15, 2019
@FredKSchott
Copy link

Thanks all, I'll move my comment there instead 👍

@lknik
Copy link
Member

lknik commented Aug 22, 2019

Maybe relevant.

@domfarolino
Copy link
Author

Quite. Thanks!

@lknik
Copy link
Member

lknik commented Aug 27, 2019

Is there any explainer in plan to get a better idea what's being done here? (maybe this document if of help).
Any view on finalising the pulls referenced above?
Are you filling a security/privacy questionnaire?

@lknik
Copy link
Member

lknik commented Aug 27, 2019

Might be useful context

Interoperability and Compatibility
We think the interoperability risk is low, because Apple has contributed to the spec discussion and started working on their implementation. Mozilla has also expressed interest. The final spec details are not resolved yet, but multiparty interest in this makes us confident that all vendors will work together to ship these changes.

@annevk
Copy link
Member

annevk commented Aug 27, 2019

@lknik I think it'll very much depend on usage data as per w3c/resource-hints#82 (comment). It's not entirely clear to me this feature is pulling its weight in a privacy-first world.

@domfarolino
Copy link
Author

TLDR: I don't think this is ready for a deep review by the TAG, I just wanted to file this issue very early while Chrome and other vendors get their stance straight and proposing ideas in case TAG had any early input.


Is there any explainer in plan to get a better idea what's being done here? (maybe this document if of help).

Ah, yes I actually wrote that document. No explainer yet, as the ultimate direction is not entirely clear yet (sorry).

Any view on finalising the pulls referenced above?

RE spec: I'll defer to @yoavweiss, as he is currently authoring the spec changes relevant here. But as Anne mentioned, I agree a lot of that is blocked on how implementations decide to move forward.

To be clear: I think we'll likely not have any progress on this until after TPAC when vendors discuss this a bit more, so feel free to defer seriously at this looking until a meeting after 2019-09-04 (when the current label suggests this will be looked at closer). Just wanted to file an issue at the same time as I wrote Chromium's Intent-to-Implement to get his out earlier rather than later.

Are you filling a security/privacy questionnaire?

I will, however this won't be done until the direction is more clear (see above).

Might be useful context [...]

Ah, yes I wrote that too :)

@domfarolino
Copy link
Author

It's not entirely clear to me this feature is pulling its weight in a privacy-first world.

@annevk Are you mentioning that it might not be worth keeping prefetch around at all, or specifically not worth supporting cross-origin prefetch in a privacy-first world?

@lknik lknik added Priority: low Review type: CG early review An early review of general direction from a Community Group labels Sep 25, 2019
@plinss
Copy link
Member

plinss commented Jan 29, 2020

Ok, we're going to close this issue for now. Feel free to ping us to re-open or file a new issue when it's ready for further review.

@plinss plinss closed this as completed Jan 29, 2020
@rhiaro rhiaro added the Mode: none Does not require TAG review label May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Missing: explainer Missing: security & privacy review Mode: none Does not require TAG review Priority: low Review type: CG early review An early review of general direction from a Community Group Topic: fetch and preload Things that live on top of (but close to) networking. Topic: HTML Topic: privacy Venue: WHATWG
Projects
None yet
Development

No branches or pull requests

8 participants