W3C home > Mailing lists > Public > whatwg@whatwg.org > June 2011

[whatwg] Why do we need Mozilla in userAgent string?

From: Ian Hickson <ian@hixie.ch>
Date: Wed, 15 Jun 2011 04:32:38 +0000 (UTC)
Message-ID: <Pine.LNX.4.64.1106150432260.19153@ps20323.dreamhostps.com>
On Sat, 26 Mar 2011, Biju wrote:
>
> Nearly all browsers have word "Mozilla" in userAgent string, hence no
> benefit in detecting that at server.
> So why do we need "Mozilla" in userAgent string?

On Sat, 26 Mar 2011, Oliver Hunt wrote:
>
> Because there are a huge number of sites out there that check for the 
> existence of a feature by doing 'navigator.userAgent.indexOf("mozilla") 
> != -1' or similar (or they decide that the absence of the mozilla term 
> means that you're IE6), so not including the word "mozilla" in the user 
> agent would cause those sites to break.
> 
> The majority of the content in modern user agent strings is not about 
> telling the server or client anything useful about the browser, it's 
> about making badly written websites work correctly.

Yup, that's pretty much it.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Tuesday, 14 June 2011 21:32:38 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:09:06 UTC