Why do user agents start with mozilla




















Summing that story up "its just every browser pretends to be Mozilla". You can use the above website to get the formatted user agent and OS. They have an API which you can use directly Because that's how Netscape identified itself, and Microsoft wanted to work with sites that would detect Netscape and reject anything else. 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!

Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams?

Collectives on Stack Overflow. Learn more. Ask Question. Asked 12 years, 3 months ago. Active 4 months ago. Viewed 43k times. Improve this question. Mark Amery k 61 61 gold badges silver badges bronze badges.

Please do not discriminate against me. Add a comment. Active Oldest Votes. It is publicly renamed to Netscape, but in its User-Agent it keeps its original name. Internet Explorer is released. Over time, Gecko, Konqueror, Opera, Safari and Chrome each decide to similarly spoof the User-Agent of some previous browser in order to manipulate browser-sniffing web pages into correctly understanding their browser's features.

Plenty of other nonsense also results, like modern Chrome's User-Agent simultaneously claiming to be Mozilla, Chrome, Safari, and 'like Gecko'. Improve this answer. Jason Creighton Jason Creighton Note that the "Mozilla" here is not the current open-source project of that name, but the original codename of Netscape, thought to refer to "Mosaic Killer".

The codename was reused many years later for the open source project, whose rendering engine is the "Gecko" mentioned here. And here we are in , still perpetuating the stupidity. No wonder it's hard to do browser detection, they're all pretending to be one another! The browser wars weren't without casualties. Show 5 more comments. Each browser has its own, distinctive user agent.

The web server can use this information to serve different web pages to different web browsers and different operating systems. This user agent tells the web server quite a bit: The operating system is Windows 7 code name Windows NT 6.

The user agent string identifies the browser as IE 9 with the Trident 5 rendering engine. However, you might spot something confusing — IE identifies itself as Mozilla. The plot thickens: Chrome is pretending to be both Mozilla and Safari. Mosaic was one of the first browsers. Mozilla was a more advanced browser than Mosaic — in particular, it supported frames. Web servers checked to see that the user agent contained the word Mozilla and sent pages containing frames to Mozilla browsers.

To other browsers, web servers sent the old pages without frames. Web servers were happy to see the word Mozilla and sent IE the modern web pages. Other browsers that came later did the same thing. In this way, browser developers kept adding words to their user agents over time.

Web servers can give bots special treatment — for example, by allowing them through mandatory registration screens.



0コメント

  • 1000 / 1000