[thelist] browser detection for fun and profit
Cake
cake at brothercake.com
Tue Mar 4 12:18:01 CST 2003
> After going through all available browser information I *think* they
> use navigator.productSub, which in all cases is 20021225.
> That leaves open the question what they'll do when a new Safari
version
> is released with a new productSub (at least, I assume it'll have a new
one).
The following appears to identify Safari reliably, in a context where
you've *already established that the browser is not konqueror*:
(typeof document.childNodes!="undefined" && typeof
document.all=="undefined" && typeof navigator.taintEnabled=="undefined")
Thanks to Mark 'Tarquin' Wilton-Jones who sent me this snippet; I've
incorporated it into a small client sniffer at
http://www.brothercake.com/scripts/sniffer.php
James
More information about the thelist
mailing list