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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-web-toolkit/0b930f29-1cc4-4016-a47e-191e50685b6bn%40googlegroups.com.

Reply via email to