• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Detect Safari Version
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Detect Safari Version


  • Subject: Re: Detect Safari Version
  • From: Frank Midgley <email@hidden>
  • Date: Thu, 13 Jan 2005 10:46:28 -0600

On Jan 13, 2005, at 1:10AM, Mont Rothstein wrote:

In the DOM you want the navigator object. The userAgent property has the information you are looking for.

I don't know Java, so I can't tell you specifically how to grab it, but that is where it is.

So you know what you are looking the userAgent for Safari currently gives:

"Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/125.5.5 (KHTML, like Gecko) Safari/125.12"

Since the original poster is writing a Java application using WebKit and not a java plug-in running inside a browser wouldn't it make more sense to check WebKit's version directly? Just check the CFBundleVersion key in /System/Library/Frameworks/WebKit.framework/Resources/Info.plist.

If you are using a WebView then it really doesn't matter what version of Safari is installed. It matters what version of WebKit.framework is installed.

-Frank

------------------------------------
Frank M. Midgley
email@hidden
http://homepage.mac.com/knarf/

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Detect Safari Version
      • From: email@hidden
References: 
 >Detect Safari Version (From: email@hidden)
 >Re: Detect Safari Version (From: Kevin Ballard <email@hidden>)
 >Re: Detect Safari Version (From: Mont Rothstein <email@hidden>)

  • Prev by Date: Re: Detect Safari Version
  • Next by Date: Re: bit/byte processing in cocoa
  • Previous by thread: Re: Detect Safari Version
  • Next by thread: Re: Detect Safari Version
  • Index(es):
    • Date
    • Thread