4

Detecting the operating system of a visitor used to be easy with the navigator.platform solution. However, this solution is now deprecated, so my question, quite simply, is there another way to retrieve the OS using JavaScript?

I have looked around the web and everything seems to point towards the navigator object, but as you can see from the following link, this has been deprecated...

https://developer.mozilla.org/en-US/docs/Web/API/NavigatorID/platform

Pawan Nogariya
  • 8,330
  • 12
  • 52
  • 105
Ben Carey
  • 16,540
  • 19
  • 87
  • 169
  • Possible duplicate of [How to find the operating system version using JavaScript](http://stackoverflow.com/questions/9514179/how-to-find-the-operating-system-version-using-javascript) – Marco Castelluccio Feb 09 '16 at 11:44
  • 3
    @Marco Did you even read my question??? I specifically point out that this question needs an updated answer as the other questions (including the one you have pointed out) are using a deprecated method... – Ben Carey Feb 09 '16 at 11:46
  • 1
    Well, I didn't you know you already saw that question. There's no need to be rude. – Marco Castelluccio Feb 09 '16 at 11:47
  • Im not being rude @Marco, I am merely pointing out that if you read the question and not just the title, you wouldn't have marked it as a possible duplicate. I have now updated the title that should make it clearer – Ben Carey Feb 09 '16 at 11:51
  • I have read your question. You only mentioned `navigator.platform`, while the answers in the other question mentioned many other properties, so I thought you hadn't seen it. – Marco Castelluccio Feb 09 '16 at 11:53
  • 1
    the link in your question points to `navigator.platform`... `Navigator` is NOT deprecated. – Marco Castelluccio Feb 09 '16 at 12:23

1 Answers1

0

This can be usefull for you, a small project from github.

https://github.com/Pagawa/PgwBrowser http://pgwjs.com/pgwbrowser/

The code to use var pgwBrowser = $.pgwBrowser();

Radu Lozovanu
  • 167
  • 4
  • 17