I’m working on OSX application that needs a CSS preview.
I need to find a way to differentiate users with safari 5.0 from users with safari 5.1 because webkit preview has many differences in this 2 versions.
For example, the gradient radial interpretation is totally different!
Is there a way to intercept the webkit version ?
You can get the user-agent string for the current WebKit version using JavaScript. Just do something like this:
which will produce something like this:
You can then parse the user-agent string to get the version of WebKit in use.