1

I m trying to make my website social icon, refer to a link (when clicked) based on the platform being used on. like the following:

  • if The website is opened on ios phone, ipad... to launch a specific deep link.
  • if The website is opened on android phone ... to launch a specific deep link.
  • if The website is opened on desktop pc ... to launch a specific link.

Thank you!

Shady
  • 31
  • 6
  • 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) – Vladimir M Apr 21 '17 at 09:58

1 Answers1

0

You can use HTTP Header.

See: https://en.wikipedia.org/wiki/List_of_HTTP_header_fields

Through the User-Agent field you can get the browser version etc. Other header could be interesting for you, too.

  • oh, thank you for your help! but i wanted some help in writing the jquery code to perform the detection and if statements. – Shady Apr 21 '17 at 10:20