Detecting Safari?

Associate
Joined
12 Aug 2004
Posts
1,009
Location
Glasgow, Scotland
Hey :)

Is there an extremely simple way to detect (with javascript) if the browser being used is safari?

I *think* i've found a way of doing it, by looking at a massively long and complicated browser detection script but it just seems to easy to work.

Code:
if (navigator.appName.indexOf('Safari') != -1)
{

}
 
Back
Top Bottom