user3279954
user3279954

Reputation: 586

Why chrome sends all agent names as part of user-agent header

Is there any reason why chrome browser (71 probably earlier version too) sends all browser names as part of its user agent parameter ?

This is what i see in the console. Is this expected, Will this affect the client information if the server wants to know/log the agent names ?


Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36

Upvotes: 7

Views: 3445

Answers (1)

Armin Nikdel
Armin Nikdel

Reputation: 335

They all have Mozilla in beginning of their Useragent because they follow standard mozilla rendering back in 2000 era. Most browsers share some of each other rendering engines, that's why their useragent often consist of similar values.

Browsers have came a long way to reach their current state. Current user-agents have to do with a little bit of browsers history. When there was a fight between Firefox and Internet Explorer, Chrome appeared. Some websites would ask Firefox users to switch to Internet Explorer for better rendering (because their website was old and not compatible with Firefox) and some would advice Internet Explorer users to switch to Firefox for modern rendering and better performance. There was some forks of Firefox which also used similar user agent, "Gecko/####" which say this browser is using Gecko engine. Websites check if a browser have "Gecko" in its user agent and decide to show modern design. Chrome is using Apple WebKit engine to render HTML, but in order to avoid those websites show recommendation for Internet Explorer, added "Like Gecko" to it's useragent.

Now that Chrome is top browser, have a look at Microsoft Edge 14: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML like Gecko) Chrome/51.0.2704.79 Safari/537.36 Edge/14.14931

As Internet Explorer reputation got very bad, Microsoft could not use any user agent string that could make websites think Edge is Internet Explorer. therefor, by putting Chrome, Safari, AppleWebKit, "Like Gecko" is satisfy websites that are looking for this strings to avoid showing a message to switch to Chrome. Microsoft is using "AppleWebKit" in it's useragent even when they are not using AppleWebKit yet. (They will start using in next versions of Edge)

Upvotes: 9

Related Questions