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

Should <meta http-equiv="origin-trial"> be valid? #7858

Open
NagayamaToshiaki opened this issue Apr 26, 2022 · 6 comments
Open

Should <meta http-equiv="origin-trial"> be valid? #7858

NagayamaToshiaki opened this issue Apr 26, 2022 · 6 comments
Labels
addition/proposal New features or enhancements document conformance

Comments

@NagayamaToshiaki
Copy link

Chrome uses this http-equiv value that is not in the spec. Origin trial should be used inside the dev, not in the product. This reminds me of the vendor-prefix hell. Should browsers accept this keyword or not? If so, we should add this to the spec.

@annevk annevk added addition/proposal New features or enhancements needs implementer interest Moving the issue forward requires implementers to express interest labels Apr 26, 2022
@domenic
Copy link
Member

domenic commented Apr 26, 2022

This seems like it's only implemented in one browser, and as such is not a candidate for addition to the HTML Standard.

This doesn't mean browsers can't accept it, or that web developers cannot use it. But it does mean that it doesn't belong in the HTML Standard, until such a time as multiple browsers are interested in accepting it.

So, we'll keep this tagged as "addition/proposal" and "needs implementer interest" until that time arrives.

@rviscomi
Copy link

rviscomi commented Jul 18, 2023

I was surprised to learn that this tag can cause pages to fail validation, for example:

image

https://validator.w3.org/nu/?doc=https%3A%2F%2Frviscomi.dev%2F&submit=Check

This seems like it's only implemented in one browser, and as such is not a candidate for addition to the HTML Standard.

Judging by the developer docs, http-equiv=origin-trial seems to be implemented in all three major browsers that support origin trials. Is it worth reconsidering standardization?

Chrome

As a meta tag in the `<head>`: `<meta http-equiv="origin-trial" content="TOKEN_GOES_HERE">`

https://developer.chrome.com/en/docs/web-platform/origin-trials/#take-part-in-an-origin-trial

Edge

Add the `origin-trial` attribute value and your token to the `meta` tag on every page that uses the experimental API.

`<meta http-equiv="origin-trial" content="replace-with-your-token">`

https://learn.microsoft.com/en-us/microsoft-edge/origin-trials/#apply-your-token

Firefox

`<meta http-equiv="origin-trial" content="your-token">`

https://wiki.mozilla.org/Origin_Trials#Using_the_trial_token

@domenic domenic removed the needs implementer interest Moving the issue forward requires implementers to express interest label Jul 19, 2023
@domenic
Copy link
Member

domenic commented Jul 19, 2023

Thanks for the update! That is indeed two browser engines, which meets our working mode criteria for additions. A pull request adding the value would be welcome at this point.

What such a pull request would need to include:

  • Details on the processing model. Existing http-equiv values are all respected on dynamic insertion. Is that the case for origin-trial (in both Chromium and Gecko)? If not, the specification will be complex.

  • Details on parsing. Does whitespace get stripped? Are multiple tokens supported? If so, comma-separated or space-separated or...?

  • The end result should be an algorithm which produces one or more origin trial tokens, and then does something implementation-defined with them.

  • Conformance requirements for what makes the token values valid. (Probably very basic, like, not being the empty string.)

@rviscomi
Copy link

Thanks @domenic, I'm glad to hear that this can move forward. Hopefully someone else with more implementation experience than me can write the PR.

I was also wondering about this rule:

There must not be more than one meta element with any particular state in the document at a time.

(see the bottom of Section 4.2.5.3)

It's normal for a site to enroll in multiple origin trials, so in practice there could be multiple origin-trial meta elements.

How feasible is it to bend the rule to exempt origin trials, or is it really meant to be a strict requirement for all pragma directives?

@domenic
Copy link
Member

domenic commented Jul 21, 2023

Oh interesting. As far as I can tell that requirement is in place because, for all existing pragmas, it only makes sense to have one of them. So we can add an exemption for origin-trial.

@shawnthompson
Copy link

I'd like to see this be implemented as it's also showing up in Safari.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
addition/proposal New features or enhancements document conformance
Development

No branches or pull requests

6 participants