LinuxSA Mailing list archives

Index: [thread] [date] [subject] [author] [stats]
  From: Andrew Lord <andrewlord@internode.on.net>
  To  : <linuxsa@linuxsa.org.au>
  Date: Tue, 29 Apr 2003 01:27:18 +0930

Re: navigator.appName

On Tue, 29 Apr 2003 12:47 am, Mike Gratton wrote:
> Mark Newton wrote:
> > On Mon, Apr 28, 2003 at 11:59:32PM +0930, Andrew Lord wrote:
> >> Further to the point, how do I get the true name of the browser,
> >> such as "Galeon" or "Mozilla" into my JavaScript ?
> >
> > They'll be using the web server referrer logs; nothing to do with
> > JavaScript.

Hi Mike

Thanks for your answer.
>
> Yep. They guess based on the user agent string (if reported). For
> Galeon, a typical UA string is:
>
> "Mozilla/5.0 Galeon/1.2.6 (X11; Linux i686; U;) Gecko/20020827"
>
> You can access this via the "window.navigator.userAgent" property, but
> as Mark said, if you're using UA sniffing as an essential part of of
> your JavaScript, you're doing something wrong. If you are using it for
> some cosmetic touch, then sniffing will mostly do the job, but be aware
> that you won't be able to sniff correctly 100% of the time.
>

Excellent.  My JS skills ain't much, but they're improving (painfully) slowly.  
I'll give your suggestion a go.

Cheers,

Andew Lord

> /mike


>
> --
> Mike Gratton <mike@vee.net>
>    I want you to know, he's not coming back.
>    Blatant self-promotion: <http://web.vee.net/>;

-- 
LinuxSA WWW: http://www.linuxsa.org.au/ IRC: #linuxsa on irc.freenode.net
To unsubscribe from the LinuxSA list:
  mail linuxsa-request@linuxsa.org.au with "unsubscribe" as the subject


Index: [thread] [date] [subject] [author] [stats]
Return to the LinuxSA Mailing List Information Page