bestiejs / platform.js

A platform detection library.
https://mths.be/platform
MIT License
3.22k stars 408 forks source link

Firefox version detected partially. #188

Closed vaanis closed 3 years ago

vaanis commented 4 years ago

My Firefox browser version is 81.0.1 but platform.js is detecting only 81.0

Is there a way for platform.js to fetch the complete version i.e., 81.0.1? we are using an older version of platform.js from 2018 but even when I updated to the latest platform.js this issue persists.

Attached two files with the browser versions. Browser version coming from platform.js: browser_version_platformJS

browser version from Firefox: Firefox_version

basvandenwijngaard commented 3 years ago

I came across the same issue. So I checked the User Agent string, but Firefox doesn't pass the patch-part of the version number in it's User Agent string, only the major and minor parts are included.

For example: When you are on Firefox 81.0.1, only 81.0 is passed by Firefox in the User Agent string.

It seems to me that it is impossible to fetch the full version number, if the browser is not telling it's full version number.

bnjmnt4n commented 3 years ago

This can't be helped, as mentioned Firefox doesn't include the patch version in navigator.userAgent. As such, we can only obtain the major and minor versions.