為了改善您的使用體驗,本網站正在進行維護,部分功能暫時無法使用。若本站的文件無法解決您的問題,想要向社群發問的話,請到 Twitter 上的 @FirefoxSupport 或 Reddit 上的 /r/firefox 發問,我們的社群成員將很快會回覆您的疑問。

搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

了解更多

userAgent - OS X version issue. Why is it that if I'm on OS X 10.7.5, the userAgent only reports 10.7?

  • 1 回覆
  • 1 有這個問題
  • 1 次檢視
  • 最近回覆由 user633449

more options

I am trying to identify exactly the version of the Mac OS X the clients are using, in order to display (or not) an information message.

To my surprise, when calling in javascript: navigator.userAgent this is working great in Safari/Chrome (ie. 10_7_5), but not in FF 21.0 (only 10.7 is reported). Why do I also need the last minor in the OS version?! Because a serious kernel bug present in OS X 10.8, 10.8.1, 10.8.2 and 10.8.3 was fixed in 10.8.4. If the user is not on 10.8.4 or later, I want to display an information message. SO, HOW CAN I DO THIS IN FF, WITHOUT ASKING THE USER TO RUN/ INSTALL A Java Applet, AR NAY ADDITIONAL JUNK?

Why FF no longer displays the full OS version when calling the navigator.userAgent?

Thank you,

Teddy.

I am trying to identify exactly the version of the Mac OS X the clients are using, in order to display (or not) an information message. To my surprise, when calling in javascript: navigator.userAgent this is working great in Safari/Chrome (ie. 10_7_5), but not in FF 21.0 (only 10.7 is reported). Why do I also need the last minor in the OS version?! Because a serious kernel bug present in OS X 10.8, 10.8.1, 10.8.2 and 10.8.3 was fixed in 10.8.4. If the user is not on 10.8.4 or later, I want to display an information message. SO, HOW CAN I DO THIS IN FF, WITHOUT ASKING THE USER TO RUN/ INSTALL A Java Applet, AR NAY ADDITIONAL JUNK? Why FF no longer displays the full OS version when calling the navigator.userAgent? Thank you, Teddy.

所有回覆 (1)

more options

User Agent doesn't display minor OS versions and there is no way to force it to. If you are running an enterprise you should begin to make your users update other ways.