View Full Version : Browser UA match for safari

01-08-2004, 08:51 PM
I have a script that extracts the browser name from the User agent and tries to grab the version as well, but i'm not completely sure what i should be grabbing for safari browsers as i've only seen one example thus far in my logs:

Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-us) AppleWebKit/85.7 (KHTML, like Gecko) Safari/85.6

now looking at that it appears to be version 85.6 or 85.7 but both of those numbers seem very high, does anyone have any other examples of UAs from safari so i know what it is that i want to be matching/capturing

if someone could provide some regexp that'll match a safari browser and grab the version number that'd be great


01-09-2004, 09:02 AM
Mine says the same thing, and it's 1.0 on OSX10.2. You certainly don't need to worry about earlier builds, because Safari updates come through automatically with System Update.

But there is a 1.1 which is only available for OSX10.3; fraid I don't know the version number in the UA string.

But btw - you know that detecting Safari with the UA string is not completely reliable - Safari has total spoofing where it can have a different UA string that doesn't mention Safari at all.