HTMLViewer version

I would like to get what version of Safari is installed on a users system. I tried doing it through the browser Mime type with the HTMLViewer, but it returns a “Safari Generic” with no version number.



  var s = navigator.userAgent;

Gives a string like this, when running in Safari proper:

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_5) AppleWebKit/537.74.9 (KHTML, like Gecko) Version/6.1.2 Safari/537.74.9

When running in a HTMLviewer, gives this:

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_5) AppleWebKit/536.30.1 (KHTML, like Gecko)

Interesting that they are different version #s.

Are you looking for the WebKit version, or the actual Safari application version?

I would like the safari version. Is there a way to match up what webkit version goes with what safari version?

Looks like wikipedia has a table to do that. That might work. Thanks!

Anyone know why the two versions are not the same? Is this something to do with what version Xojo links against? Or is it just the case that WebKit controls in cocoa apps don’t use the same framework version as the Safari app?

If you have the MBS plugin or the MacOSLib, you can use functions to find Safari, obtain the bundle from Safari. Then you can read the version number from the bundle.

As Sam wrote above, look into the app’ bundles Info.plist file, let your app browse to


which will find the line

<string>12.0, Copyright © 2003-2018 Apple Inc.</string>

It’s the same way I do with DOSBox to find its version number.