Safari can be reliably detected using the vendor attribute of the navigator object.
if (navigator.vendor == "Apple Computer, Inc.") {
alert('This browser is probably Safari');
}
alert('This browser is probably Safari');
}
Safari can be reliably detected using the vendor attribute of the navigator object.