Support for three-digit version numbers?
Closed this issue · 4 comments
Chrome and Firefox will soon reach version 100.
This article describes how this might break libraries that parse the user-agent:
https://hacks.mozilla.org/2022/02/version-100-in-chrome-and-firefox/
Additionally, it seems that Chromium 100 brings even more changes to the user-agent string:
https://www.xda-developers.com/chrome-100-beta/
I have not seen any issues, prs or release notes of the which-browser
package that are related to this issue.
Is the current version of which-browser
forward compatible with three-digit browser version numbers?
Hello,
the RegEx we use for Chrome version can handle three digit version but I need to double check if somewhere else in the code will cause any issue.
Same for Firefox.
Would be nice if you can provide the two set of User-Agent for the 100+ version of both browser so I can test next week.
Hi @mariotsi ,
thank you for your fast response! 🙂
From the first article above:
In Chrome and Firefox Nightly, you can configure the browser to report the version as 100 right now and report any issues you come across.
Configure Firefox Nightly to report the major version as 100:
- Open Firefox Nightly’s Settings menu.
- Search for “Firefox 100” and then check the “Firefox 100 User-Agent String” option.
Configure Chrome to report the major version as 100
- Go to chrome://flags/#force-major-version-to-100
- Set the option to
Enabled
.
Doing so, I get the following user-agent strings.
Chrome:
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4844.82 Safari/537.36"
Firefox Nightly:
"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:100.0) Gecko/20100101 Firefox/100.0"
Hey,
I tested both UserAgents, plus the one from Chrome Stable since the v100 came out.
The version number was detected correctly but in Chrome there was an issue that led the camouflage flag to be added and the string outcome was an unknown browser that imitates Chrome 100 on Windows 10
I did fix the camouflage issue and added the stable versions of Chrome 99 and 100 in #62
Upgrade and you'll be good to go with the three digit browsers versions.
Simone