Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
108 changes: 108 additions & 0 deletions api/Navigator.json
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,42 @@
"standard_track": true,
"deprecated": false
}
},
"applies_UA_reduction": {
"__compat": {
"description": "Applies [User-agent reduction](https://developer.mozilla.org/docs/Web/HTTP/Guides/User-agent_reduction).",
"spec_url": "https://compat.spec.whatwg.org/#ua-string-section",
Comment on lines +328 to +331
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Elchi3 What do you think about this behavioral subfeature?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You didn't ask me so FWIW, I'm -1 on this as a feature or at least one that is "standard_track": true. The linked "spec" says:

This section serves as a descriptive record of the User-Agent patterns found in the so-called major web browsers

If it's descriptive, then it's merely documentation that does not specify anything. The spec doesn't actually say what the vendors must or should do, just what they have done as convention. I think this is comparable to linking to an MDN page in a spec_url.

I think this would be better as a note that says exactly what's being reduced. Something along the lines of:

From version 110, the reported browser version number is always in the pattern of X.0.0.0 where X is the major version number.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your logic here sounds reasonable, but downgrading this to a note troubles me a bit. I am documenting user-agent reduction and what it means to the values reported by the User-Agent HTTP header (and associated API features). In a couple of places, like here in the user-agent reduction guide I link to the browser compat table to let people know which browsers support this.

I worry that if it is just a note, it'll be fairly easy to miss the note.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I acknowledge this concern and I agree that is a bit obscure in a note. That said, maybe a change to the docs might help? My suggestion for the docs would be to be somewhat more aggressive in saying that the content of a UA string is not actually standardized (even if the string's format is) and, theoretically, could change at any time. The browser tables might tell you how and when UA strings have changed, but I would hate to suggest to a developer that they could or should rely on that information.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair point. Could we do both?

I'd still like UA reduction to be called out in the compat tables (and let's face it, we'll need to add another data point if a browser decides to do a U-turn, whether the info is contained in notes or separate data points).

But I also see the value in updating the doc that the data point links to, to make it clearer that the UA string content is still not standardized.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, both is OK. I would still like these subfeatures to be standard_track: false though (it would be nice for web-features, where I don't think this is a thing that should get a meaningful computed status—it's not really a "feature" that developers can use—if anything, it represents the opposite).

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can also just update the spec to be normative if that makes your lives easier.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If that means we can put standard_track: true, then I think it is a good idea.

It would still be good to update the docs, as previously discussed.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did not think editing the spec would be an option. That would be ideal!

"support": {
"chrome": {
"version_added": "110"
},
"chrome_android": {
"version_added": "113"
},
"edge": "mirror",
"firefox": {
"version_added": false
},
"firefox_android": "mirror",
"oculus": "mirror",
"opera": "mirror",
"opera_android": "mirror",
"safari": {
"version_added": false
},
"safari_ios": "mirror",
"samsunginternet_android": "mirror",
"webview_android": {
"version_added": false
},
"webview_ios": "mirror"
},
"status": {
"experimental": true,
"standard_track": true,
"deprecated": false
}
}
}
},
"audioSession": {
Expand Down Expand Up @@ -2970,6 +3006,42 @@
"standard_track": true,
"deprecated": false
}
},
"applies_UA_reduction": {
"__compat": {
"description": "Applies [User-agent reduction](https://developer.mozilla.org/docs/Web/HTTP/Guides/User-agent_reduction).",
"spec_url": "https://compat.spec.whatwg.org/#ua-string-section",
"support": {
"chrome": {
"version_added": "110"
},
"chrome_android": {
"version_added": "113"
},
"edge": "mirror",
"firefox": {
"version_added": false
},
"firefox_android": "mirror",
"oculus": "mirror",
"opera": "mirror",
"opera_android": "mirror",
"safari": {
"version_added": false
},
"safari_ios": "mirror",
"samsunginternet_android": "mirror",
"webview_android": {
"version_added": false
},
"webview_ios": "mirror"
},
"status": {
"experimental": true,
"standard_track": true,
"deprecated": false
}
}
}
},
"plugins": {
Expand Down Expand Up @@ -5487,6 +5559,42 @@
"standard_track": true,
"deprecated": false
}
},
"applies_UA_reduction": {
"__compat": {
"description": "Applies [User-agent reduction](https://developer.mozilla.org/docs/Web/HTTP/Guides/User-agent_reduction).",
"spec_url": "https://compat.spec.whatwg.org/#ua-string-section",
"support": {
"chrome": {
"version_added": "110"
},
"chrome_android": {
"version_added": "113"
},
"edge": "mirror",
"firefox": {
"version_added": false
},
"firefox_android": "mirror",
"oculus": "mirror",
"opera": "mirror",
"opera_android": "mirror",
"safari": {
"version_added": false
},
"safari_ios": "mirror",
"samsunginternet_android": "mirror",
"webview_android": {
"version_added": false
},
"webview_ios": "mirror"
},
"status": {
"experimental": true,
"standard_track": true,
"deprecated": false
}
}
}
},
"userAgentData": {
Expand Down
36 changes: 36 additions & 0 deletions http/headers/User-Agent.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,42 @@
"standard_track": true,
"deprecated": false
}
},
"applies_UA_reduction": {
"__compat": {
"description": "Applies [User-agent reduction](https://developer.mozilla.org/docs/Web/HTTP/Guides/User-agent_reduction).",
"spec_url": "https://compat.spec.whatwg.org/#ua-string-section",
"support": {
"chrome": {
"version_added": "110"
},
"chrome_android": {
"version_added": "113"
},
"edge": "mirror",
"firefox": {
"version_added": false
},
"firefox_android": "mirror",
"oculus": "mirror",
"opera": "mirror",
"opera_android": "mirror",
"safari": {
"version_added": false
},
"safari_ios": "mirror",
"samsunginternet_android": "mirror",
"webview_android": {
"version_added": false
},
"webview_ios": "mirror"
},
"status": {
"experimental": true,
"standard_track": true,
"deprecated": false
}
}
}
}
}
Expand Down