1

Before macOS 11, the UA parameter could be used to determine browser version and system version.

Now the UA parameter is almost fixed, such as:

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36 OPR/101.0.0.0

Firefox and Chrome are in a similar situation. Is there a way to get the true version of the system?

VLAZ
  • 26,331
  • 9
  • 49
  • 67
Vndroid
  • 17
  • 5
  • 1
    When asking such questions you should also mention the use case for which it is important to know the macOS version. – t.niese Aug 31 '23 at 08:40
  • Does this answer your question? [How to find the operating system details using JavaScript?](https://stackoverflow.com/questions/9514179/how-to-find-the-operating-system-details-using-javascript) – Justinas Aug 31 '23 at 08:41
  • It is difficult to prove that something is not possible. If you are not getting answers, it's an indication that it may be impossible. – JSON Derulo Aug 31 '23 at 08:50
  • Why do you want to do this? (It's probably/usually a bad idea ... ) – MikeB Aug 31 '23 at 09:06
  • 1
    [From UA docs](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/userAgent): The specification asks browsers to provide as little information via this field as possible. Never assume that the value of this property will stay the same in future versions of the same browser. Try not to use it at all, or only for current and past versions of a browser. [...] Also keep in mind that users of a browser can change the value of this field if they want (UA spoofing). – JSON Derulo Aug 31 '23 at 09:53
  • @MikeB The purpose is to count the distribution of system versions used by users of the product and provide data support for subsequent product iterations. – Vndroid Sep 02 '23 at 01:11
  • @Justinas It's very unfortunate that this one actually gets UA information, it's essentially the same thing. – Vndroid Sep 02 '23 at 01:12
  • @JSONDerulo Yes, but most users don't fake UA parameters, so it's still useful for counting the platforms users are using, but there doesn't seem to be a way to get the actual platform version at the moment. – Vndroid Sep 02 '23 at 01:14

0 Answers0