Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

188
Vistas
How to Detect macOS Big Sur and/or Monterey in JavaScript?

I am running macOS Monterey (12.2) with Safari 15.3. I am trying to use JavaScript in Safari (or Chrome) to programmatically determine the version of macOS installed.

When I run the following command:

var nAgt = navigator.userAgent;

I get the following results:

Safari

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.3 Safari/605.1.15

Google Chrome

Mozilla/5.0 (Macintosh; Intel Mac OS X10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.110 Safari/537.36

Why am I seeing 10_15_7? Should I not be seeing 12_2 somewhere?

about 4 years ago · Juan Pablo Isaza
2 Respuestas
Responde la pregunta

0

Thank you to @Quentin ... IF I understand correctly, It appears that one can no longer get accurate reporting of the newer macOS systems via the UserAgent.

  • It seems much of the world simply assumed that it would be macOS 10.xx forever and therefore many sites could not handle a macOS 11.xx or a macOS 12.xx response.

  • There also appears to be a desire to hide underlying details of the OS for those who might use it for nefarious "fingerprinting purposes".

about 4 years ago · Juan Pablo Isaza Denunciar

0

User agent string is no longer reliable in future versions of Mac OS and Windows (11). You should look into client hints API for javascript. Some references for context and the future solution:

https://www.otsukare.info/2021/02/15/capping-macos-user-agent

https://help.duo.com/s/article/6627?language=en_US

https://web.dev/user-agent-client-hints/

https://browserleaks.com/client-hints

The new API doesn't work for all browsers yet. So until the world catches up, the detection for new OSes is best effort.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda