Back in the early days, Netscape (code named Mozilla) was the main rival of IE, and they wanted to prevent being rejected by sites rejecting browsers

Why do all browsers' user agents start with “Mozilla/”?

submited by
Style Pass
2021-06-07 18:30:06

Back in the early days, Netscape (code named Mozilla) was the main rival of IE, and they wanted to prevent being rejected by sites rejecting browsers other than Netscape.

Because that's how Netscape identified itself, and Microsoft wanted to work with sites that would detect Netscape and reject anything else.

Mozilla/5.0 is the general token that says the browser is Mozilla compatible, and is common to almost every browser today. for more detail click here

In short - browsers started to pretend to be some other browser, because some websites served content based on which browser asked for it and they also wanted content meant for other browsers.

I find it surprising it still haven't been solved to this day. Since userAgent can't be safely removed for legacy reasons, why some new feature clearly identifying a browser wasn't introduced? Yes, most of the time you don't need browser detection, but rather a feature detection, but it is not built-in JS neither!

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Leave a Comment