How to detect from which type of device (Mac / iPad) a web application is opened

Hi all, I need to detect if my web application (pure HTML / Javascript) is opened from:

  1. Safari from a Mac
  2. Safari from an iPad but by asking for the desktop version

I tried to check for many properties (including the navigator.useragent) but no difference were visible. Anyone could help me?

Thank you

How to detect from which type of device (Mac / iPad) a web application is opened
 
 
Q