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

Define "user-initiated navigation" (e.g. location-bar navigation) more concretely #5381

Open
domenic opened this issue Mar 20, 2020 · 5 comments

Comments

@domenic
Copy link
Member

domenic commented Mar 20, 2020

It would be good to provide a more solid spec foundation for https://w3c.github.io/webappsec-fetch-metadata/#directly-user-initiated; perhaps most of that section should move into HTML, replacing the current vague phrase

A user agent may provide various ways for the user to explicitly cause a browsing context to navigate, in addition to those defined in this specification.

Besides Sec-Fetch-Site, this also causes browsing context swaps---at least in Chromium---and getting that specified and tested would be good. (See #5350.)

@jakearchibald
Copy link
Contributor

This is important, since (at least) Chrome will not allow document-initiated navigations to abort browser-UI-triggered navigations.

@domenic
Copy link
Member Author

domenic commented Dec 24, 2020

#2414 is related

@domenic
Copy link
Member Author

domenic commented Mar 8, 2021

I might solve this at least partially in WICG/navigation-api#63, although fully closing it would involve updating the Sec-Fetch-Site spec.

@annevk
Copy link
Member

annevk commented Mar 9, 2021

I guess it would impact how Sec-Fetch-Site is defined? I suspect the primitive here is request's client being null, which has a number of issues in Fetch...

@domenic
Copy link
Member Author

domenic commented Mar 9, 2021

Sorry, yes, both the OP and my response say "Sec-Fetch-Dest" but the header in question is actually "Set-Fetch-Site". (I've edited both now.) Per https://w3c.github.io/webappsec-fetch-metadata/#directly-user-initiated it's currently defined in terms of HTML's

A user agent may provide various ways for the user to explicitly cause a browsing context to navigate, in addition to those defined in this specification.

which is also something app history wants to hook into.

The connection to null clients is quite interesting; it'd be good to straighten that out indeed... I'll give it a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants