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

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

From: Oliver Hunt <oliver@apple.com>
Date: Sat, 26 Mar 2011 11:43:14 -0700
Message-ID: <934FDB05-0E4D-4F2D-AD33-61E26203A529@apple.com>
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.

--Oliver

On Mar 26, 2011, at 10:47 AM, 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?
> 
> Cheers
> Biju
Received on Saturday, 26 March 2011 11:43:14 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:31 UTC