Live data from Hacker News

Why do all browsers' user agents start with "Mozilla/"? (2008)

stackoverflow.com

51–60 of 68 posts

Re: Why do all browsers' user agents start with "Mozilla/"? (2008)

#51
post #44
post #18

Earlier quoted context omitted.

In a way it seems like a classic trademark violation, tricking people (or their servers) into thinking your product is someone else’s. I wonder if there are actual agreements about this these days.

User agent strings aren't really seen by people so arguably there is no consumer confusion. And if you need the Mozilla user agent for compatibility it's reminiscent of https://en.wikipedia.org/wiki/Sega_v._Accolade

https://www.law.cornell.edu/uscode/text/15/1114

Statute doesn’t reference consumers, and does list deception as being prohibited. So it’s at least debatable.

Re: Why do all browsers' user agents start with "Mozilla/"? (2008)

#52
post #15

Earlier quoted context omitted.

> A better question is why it was never fixed / renamed to proper names. Because the reason it is the way it is in the first place is compatibility with sites that are doing things objectively wrong already, which makes it really hard to get them to change. The problem is that poorly designed systems limit access or disable features based on a user-agent allowlist, which is never the right answer. There is no right w…

Personally I’d get rid of the user agent entirely. Stop sending it and let sites query available features rather than check the specific browser version.

There are valid reasons to want to know the specific user agent when working around bugs in old but popular versions, that's why I said a user-agent allowlist for access or advanced functionality was bad. That inevitably breaks any new platforms that haven't been explicitly approved, which is obviously bad. Denying access from or specifically only applying fixes to known bad versions is fine.

Also IMO it's useful as an admin to know what clients your users are using, but I do understand why many would prefer to limit the data shared with the sites you visit.

Re: Why do all browsers' user agents start with "Mozilla/"? (2008)

#53
post #15

Earlier quoted context omitted.

> A better question is why it was never fixed / renamed to proper names. Because the reason it is the way it is in the first place is compatibility with sites that are doing things objectively wrong already, which makes it really hard to get them to change. The problem is that poorly designed systems limit access or disable features based on a user-agent allowlist, which is never the right answer. There is no right w…

When my site says Best viewed in Netscape, I mean Netscape Navigator. The rest of the world may have moved on, but static HTML 3.2 with the blink tag is forever.

Proving my point, user agent allow lists would make it only ever work on Netscape, when the blink tag was supported in Firefox prior to v23 and any of its cousins, as well as Opera prior to v15 (where it switched to Blink and became yet another Chromium derivative). As long as your HTML wasn't total jank dependent on exact bug compatibility with Netscape specifically it should work fine on a wide variety of browsers.

Re: Why do all browsers' user agents start with "Mozilla/"? (2008)

#54
post #6

Mozilla should start charging a licensing fee for starting your user agent with Mozilla/ Money problems solved!

One of the comments from the accepted answer says that the Mozilla was the codename for Netscape, link: https://stackoverflow.com/questions/1114254/why-do-all-brows...

There's a better explanation in the last comment on the page You linked.

ISTR that Netscape used to have in it's README or INSTALL (or maybe an "about"-like menu entry) a note that the name of the browser is pronounced Mozilla while only being spelled N-E-T-S-C-A-P-E.

Re: Why do all browsers' user agents start with "Mozilla/"? (2008)

#55

Not all browsers (e.g. "Lynx/2.9.0dev.12 libwww-FM/2.1") :)

And all heavy lynx users know about changing that on the fly to Mozilla for screwy websites that claim they won't work with lynx. I'm happy that I am encountering such behavior less and less over time.

Re: Why do all browsers' user agents start with "Mozilla/"? (2008)

#56
post #34

Has anyone tried running a generic User-Agent on a standard modern browser? (By "generic", I mean one that does away with this whole compatibility dance.) I'm curious how much would break or degrade.

Opera Presto didn't use it, and had a User-Agent like: Opera/9.80 (X11; Linux zvav; U; en) Presto/2.12.423 Version/12.16 Didn't seem to cause that much problems. It did keep the version at 9.80, presumably because >=10 must have caused problems somewhere.

God I miss Presto... but Opera did have major compatibility issues even when it was still popular.

Re: Why do all browsers' user agents start with "Mozilla/"? (2008)

#57
post #53

Earlier quoted context omitted.

When my site says Best viewed in Netscape, I mean Netscape Navigator. The rest of the world may have moved on, but static HTML 3.2 with the blink tag is forever.

Proving my point, user agent allow lists would make it only ever work on Netscape, when the blink tag was supported in Firefox prior to v23 and any of its cousins, as well as Opera prior to v15 (where it switched to Blink and became yet another Chromium derivative). As long as your HTML wasn't total jank dependent on exact bug compatibility with Netscape specifically it should work fine on a wide variety of browsers.

I had many fights with IT over coding to standards. They said, we do, our standard is IE 6.

They earned every ounce of pain for that decision.

Re: Why do all browsers' user agents start with "Mozilla/"? (2008)

#58
post #6

Mozilla should start charging a licensing fee for starting your user agent with Mozilla/ Money problems solved!

Maybe then folks would stop sending this header. To avoid licensing fees.

I have been omitting it for decades with great results.

Re: Why do all browsers' user agents start with "Mozilla/"? (2008)

#59
post #52

Earlier quoted context omitted.

Personally I’d get rid of the user agent entirely. Stop sending it and let sites query available features rather than check the specific browser version.

There are valid reasons to want to know the specific user agent when working around bugs in old but popular versions, that's why I said a user-agent allowlist for access or advanced functionality was bad. That inevitably breaks any new platforms that haven't been explicitly approved, which is obviously bad. Denying access from or specifically only applying fixes to known bad versions is fine. Also IMO it's useful as…

The abuse of the user agent for tracking and unreasonably blocking browsers - Chrome only websites that work fine when you spoof the user agent - out weighs the usefulness of being able to work around browser specific bugs.

These days old browser versions are for most companies, a problem of the past. IE is well and truly dead, and almost all users have auto updating browsers now.

Websites shouldn't really attempt to fit themselves to the browser, just detect which features are available and if there is some odd browser bug, wait until it's patched if it's affecting a major browser.

Re: Why do all browsers' user agents start with "Mozilla/"? (2008)

#60
post #29

Earlier quoted context omitted.

I worked on a codebase that had this bug, so I’m not sure where you’re getting “this is false” from. We sold software that was installed long-term at customer sites, and they weren’t going to update it until they needed to, so the bug persisted in production well after we fixed it.

Best I can tell it's only libraries that generate those sort of strings, which could just as well report a different string for Windows 9. The actual Windows API even returns the version information for Windows 8 if the application isn't manifested for 10 and onwards.

Company I joined in 2008 had sold software back in 2005 or so which had the bug, and customers were still running it in 2015 when Win10 came out.

The idea that "sensibly designed software wouldn't have this issue, so it must not exist" is absolutely at odds with virtually everything I've seen in my career.

Post reply on HN