Chrome / Safari / FireFox are all freeze their user agent string so you can
not know operating system version, device type and browser build number
(not the major version!) anymore. This is done to make fingerprinting more
difficult.
Here is some Chrome documentation:
https://www.chromium.org/updates/ua-reduction/
If you need to access such high entropy data you need to use a new API. GWT
itself should not be affected by these changes since you can still sniff if
it is Chrome / Safari / Firefox and which major version it is.
-- J.
t.br...@gmail.com schrieb am Sonntag, 20. Februar 2022 um 12:02:37 UTC+1:
> On Friday, February 18, 2022 at 6:00:24 PM UTC+1 David Nouls wrote:
>
>> Hello I read that FireFox and Chrome are deprecating the useragent string.
>
>
> Not sure where you read that and what it would really mean, particularly
> wrt backwards compatibility: browser vendors (and spec writers) try very
> hard not to "break the web" (e.g. its Array.prototype.includes rather than
> Array.prototype.contains because many old-ish libraries monkey-patched the
> Array prototype with a 'contains' method) so it's very unlikely that they
> remove the navigator.useragent or change it in a breaking way.
> What has been envisioned is to actually freeze the version in the UA
> string in case using a 3-digit version breaks too many websites, with
> Chrome relegating the major version into its "minor".
> https://hacks.mozilla.org/2022/02/version-100-in-chrome-and-firefox/
>
>
>> Is GWT depending on this and will it be impacted ?
>>
>
> GWT does depend on the UA string, but doesn't care about the browser
> version, except in very few cases.
> Here's the main UA-sniffing code that helps select permutations, it
> doesn't use the version (uses documentMode in Internet Explorer, which has
> since been removed and won't be in 2.10):
> https://github.com/gwtproject/gwt/blob/2.9.0/user/src/com/google/gwt/useragent/rebind/UserAgentPropertyGenerator.java
> And here are a few cases that care about the version:
>
>- those correctly patch all digits and won't break with 3-digit
>versions:
> -
>
> https://github.com/gwtproject/gwt/blob/2.9.0/user/src/com/google/gwt/user/client/ui/impl/PopupImplMozilla.java#L63
> -
>
> https://github.com/gwtproject/gwt/blob/2.9.0/user/src/com/google/gwt/dom/client/DOMImplMozilla.java#L33
> -
>
> https://github.com/gwtproject/gwt/blob/2.9.0/user/src/com/google/gwt/dom/client/DOMImplWebkit.java#L29
> -
>
> https://github.com/gwtproject/gwt/blob/2.9.0/user/src/com/google/gwt/user/client/ui/impl/HyperlinkImplIE.java#L40
> - that one would likely "break" with Chrome/110–Chrome/119, but
>IIUC unlikely to actually break apps, only send bigger payloads because it
>escapes more characters:
>
> https://github.com/gwtproject/gwt/blob/2.9.0/user/src/com/google/gwt/user/client/rpc/impl/ClientSerializationStreamWriter.java#L93
>- that one is broken since Android 10:
>
> https://github.com/gwtproject/gwt/blob/2.9.0/user/src/com/google/gwt/touch/client/TouchScroller.java#L311
>
> All other uses of navigator.useragent seem to only care about some tokens
> like "safari", "chrome", "webkit", "msie", or "gecko".
>
--
You received this message because you are subscribed to the Google Groups "GWT
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to google-web-toolkit+unsubscr...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/google-web-toolkit/97f7f007-7c74-4ba6-9912-c597457bbd99n%40googlegroups.com.