You can check userAgent as follows:
return navigator.userAgent.indexOf(\"Mac OS X\") != -1
But this is not a reliable method, because it can be faked ... but since there is no absolute javascript value for this, this is not a terrible option. The detection function is the best alternative if you want to see what the browser will / will not support ... it depends if you, after metrics, actually enable / disable the functions.
source
share