practising and preaching
Wednesday, 3. January 2007, 17:11:14
We strongly recommend looking for the AppleWebKit string and its version number, *not* for Safari
Apple's Safari FAQ writes:
If you need to identify the exact browser and version of clients accessing your site, use the AppleWebKit/XX portion of the string.
And lib.js on apple.com says:
this.isSafari= (agent.indexOf('safari') != -1);Makes you wish browser vendors had tried suing browser sniffer authors back in 1996, rather than adding elaborate workaround strings to their UserAgent information. Seriously, authors should try a lot harder to not use name sniffing.
Sniffing for "AppleWebKit" still is browser sniffing though – hardly a better alternative.
By Jere, # 4. January 2007, 09:41:03