I was working with some javascript and found a strange user agent with my Google Chrome.
I have Google Chrome 7.0.517.41 beta installed on my Ubuntu Laptop. Now AFAIK my user agent should be something close to Chrome/7.0.517.41
but it is showing me:
Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/534.7 (KHTML, like Gecko) Chrome/7.0.517.41 Safari/534.7
Why is this happening.. I have disabled all the installed extensions but it is still the same..
In user-agent spoofing, bad actors modify elements of the user agent string to obfuscate details of their traffic. For example, making high traffic volumes from a single device look like lots of individual advertising engagements from multiple devices.
Browse our database of 219.4 million User Agents - WhatIsMyBrowser.com.
The UA string tells the long and tragic history of (in)compatibility attempts. See e.g. this for a brief history of the UA. It should also make clear that UA sniffing is useless, as every modern browser pretends to be many other browsers. That is also the case you see here:
In short: some broken sites assumed that "only allowing people with Mozilla/Firefox/Webkit/whatever" is a sensible policy; in turn, browsers started lying about their origins to get around these artificial barriers. The UA strings are the result: bloatware, full of useless garbage.
Basically, Mozilla stands for "Mozilla compatible" while "KHTML, like Gecko" describes the rendering engine.
Essentially, Chrome's user agent string is saying "I'm compatible with Mozilla and my rendering engine is like Gecko" as a way of describing itself to developers.
Most (if not every) browser will identify itself as Mozilla-compatible as a kind of legacy thing, regardless of affiliation with the Mozilla foundation. Yes, even Internet Explorer.
More info on strings in general at: Mozilla's developer center.
Also, if you're developing based on user agent strings, don't. You'll only find yourself in a world of hurt: browsers get upgraded to implement features and your user agent sniff might still exclude them, user agent strings can be spoofed, and good old Opera likes to report itself as Internet Explorer in older versions.
Instead, use feature detection to determine if a feature you're trying to use exists for a given browser and then use it or don't.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With