Though both are Webkit based browsers, Safari urlencodes quotation marks in the URL while Chrome does not.
Therefore I need to distinguish between these two in JS.
//Check if Safari function isSafari() { return /^((?!chrome).)*safari/i.test(navigator.userAgent); } //Check if MAC if(navigator.userAgent.indexOf('Mac')>1){ alert(isSafari()); }
http://jsfiddle.net/s1o943gb/10/