From 3ca5920dc59b351756399bab9ded097d963a799f Mon Sep 17 00:00:00 2001 From: Mike Taylor Date: Tue, 1 Feb 2022 10:43:30 -0500 Subject: [PATCH] Add a User-Agent String section (#166) * Editorial: Remove "non-standard" from abstract. Also, get rid of an old issue that seems less relevant. Fixes: #165 * Editorial: Rework introduction ref. #146 * Editorial: Add Karl Dubost to acknowledgements. Plus some whitespace cleanup. * Add a User-Agent String section. Fixes #146 * Editorial: Fix forless media features Also do some line wrapping. See: https://github.com/tabatkins/bikeshed/issues/2200 * Add in @karlcow's suggestions Co-authored-by: Karl Dubost --- compatibility.bs | 215 +++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 199 insertions(+), 16 deletions(-) diff --git a/compatibility.bs b/compatibility.bs index f279954..9ea7957 100644 --- a/compatibility.bs +++ b/compatibility.bs @@ -4,7 +4,7 @@ H1: Compatibility Shortname: compat Text Macro: TWITTER compatstandard Text Macro: LATESTRD 2021-12 -Abstract: This standard describes a collection of non-standard (and often vendor-prefixed) CSS properties and DOM APIs that web browsers need to support for compatibility with the de facto web. +Abstract: This standard describes a collection of web platform features that web browsers need to support for compatibility with the de facto web. Translation: ja https://triple-underscore.github.io/compat-ja.html Indent: 2 Markup Shorthands: dfn yes @@ -47,11 +47,22 @@ urlPrefix: https://drafts.csswg.org/css-values-3/ text: dppx; url: #dppx +
+{
+  "HTTP-SEMANTICS": {
+    "href": "https://httpwg.org/http-core/draft-ietf-httpbis-semantics-latest.html",
+    "title": "HTTP Semantics",
+    "authors": [ "R. Fielding", "M. Nottingham", "J. Reschke" ]
+  }
+}
+
+ + + <deviceCompat> + Represents the form-factor of the device. Primarily this is Mobile , or just + the empty string, for Desktop or non-mobile devices. Some browsers have also sent token values + such as Tablet, TV, Mobile VR, etc., or included + build information as well. + + + + <frozenWebKitVersion> + AppleWebKit/ followed by a WebKit revision number, (537.36 in + the case of Chrome, and 605.1.15 in the case of Safari), followed by + (KHTML, like Gecko). + + + <frozenSafariVersion> + Safari/ followed by a WebKit revision number, (537.36 in + the case of Chrome, and 605.1.15 in the case of Safari). + + + <legacyMozillaVersion> + Mozilla/5.0 was added by Konqueror in their user agent string to make sure they were served the right content. It then became part of the normal string parser would expect when processing a user agent string. + + + <majorVersion> + Represents the browser's major version number. + + + <minorVersion> + Represents the browser's non-major version numbers. + + + <oscpu> + Represents the device operating system and (optionally) CPU architecture. + + + <platform> + Represents the underlying device platform. + + + + +

Meta Structure

+ +The User-Agent strings that follow share the common meta structure: + +<legacyMozillaVersion> (a) b + +Where a is a set of tokens representing device information and b is a set +of tokens representing browser information. + +

Chrome

+ +

Chrome User-Agent pattern

+ +<legacyMozillaVersion> (<platform>; <oscpu>) +<frozenWebKitVersion> Chrome/<chromeVersion> <deviceCompat> +<frozenSafariVersion> + +
+ Desktop: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 + (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36 + + Mobile: Mozilla/5.0 (Linux; Android 10) AppleWebKit/537.36 (KHTML, + like Gecko) Chrome/96.0.4664.93 Mobile Safari/537.36 +
+ +

Chrome-specific tokens

+ +<chromeVersion> decomposes to the following: + + +<majorVersion>.<minorVersion>, where +<minorVersion> represents MINOR.BUILD.PATCH version numbers. + +

Firefox

+ +

Firefox User-Agent pattern

+ +<legacyMozillaVersion> (<platform>; <oscpu> rv:< +firefoxVersion>) Gecko/<geckoVersion> Firefox/<firefoxVersion> + +
+ Desktop: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:100.0) Gecko/20100101 + Firefox/100.0 + + Mobile: Mozilla/5.0 (Android 10; Mobile; rv:100.0) Gecko/100.0 + Firefox/100.0 +
+ +

Firefox-specific tokens

+ +<firefoxVersion> decomposes to the following: + +<majorVersion>.0 + +In Firefox on desktop platforms (Windows, macOS, Linux, etc.), +<geckoVersion> is the frozen build +date "20100101". In Firefox on Android, <geckoVersion> is the +same value as <firefoxVersion>. + + +

Safari

+ +

Safari User-Agent pattern

+ +<legacyMozillaVersion> (Macintosh; Intel Mac OS X 10_15_7) +<frozenWebKitVersion> Version/<safariVersion> <deviceCompat> +<frozenSafariVersion> + +
+ Desktop: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 + (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36 + + Mobile: Mozilla/5.0 (iPhone; CPU iPhone OS 15_3 like Mac OS X) + AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.2 Mobile/15E148 Safari/604.1 + +
+ +

Safari-specific tokens

+ +<safariVersion> decomposes to the following: + +<majorVersion>.<minorVersion>, where +<minorVersion> is a single digit. +

Acknowledgements

-Thanks to Alan Cutter, Cameron McCormack, Chris Rebert, Chun-Min (Jeremy) Chen, Daniel Holbert, David Håsäther, Domenic Denicola, hexalys, Jean-Yves Perrier, Jacob Rossi, Philip Jägenstedt, Rick Byers, Simon Pieters, Stanley Stuart, William Chen and Your Name Here for feedback and contributions to this standard. +Thanks to Alan Cutter, Cameron McCormack, Chris Rebert, Chun-Min (Jeremy) Chen, Daniel Holbert, +David Håsäther, Domenic Denicola, hexalys, Jean-Yves Perrier, Jacob Rossi, Karl Dubost, +Philip Jägenstedt, Rick Byers, Simon Pieters, Stanley Stuart, William Chen and Your Name Here for +feedback and contributions to this standard. -Thanks to Mounir Lamouri and Marcos Cáceres for defining the {{ScreenOrientation}} interface. [[!screen-orientation]] +Thanks to Mounir Lamouri and Marcos Cáceres for defining the {{ScreenOrientation}} interface. +[[!screen-orientation]] -Special thanks to Apple and the WebKit.org blog authors for providing initial descriptions of much of the content defined in this specification. +Special thanks to Apple and the WebKit.org blog authors for providing initial descriptions of much +of the content defined in this specification. This standard is written by Mike Taylor