3

There are sites like whatsmybrowser.org and whatismybrowser.com that detect information about the technical specs of the client. As far as I can tell, this is done using the user-agent information sent by the browser on the HTTP requests.

What is puzzling me is that when I explicitly set my user-agent string to something random, in some cases it can still detect my browser and OS.

For example, whatbrowser.org knows I am using Firefox 31; and www.whatsmyua.com displays the following string:

Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:31.0) Gecko/20100101 Firefox/31.0

It looks strikingly like a user-agent.

enter image description here

But where is it being detected from? Firebug shows just fake-user-agent sent on the HTTP request headers.

If it matters, I am faking my user-agent using UAControl for Firefox (pt-br version, en-US version).

0

1 Answer 1

5

I am not sure what those sites in particular are doing, but it is possible to probe a browser with JavaScript to detect its capabilities and identification. That is how progressive enhancement is done.

3
  • 1
    I disabled my JavaScript. The two sites that detected my browser stopped detecting it. Sep 3, 2015 at 13:45
  • 1
    It's quite obvious the sites are using client-side java to display the UA function getUa() { return location.hash.replace('#', '') || navigator.userAgent; }
    – qasdfdsaq
    Sep 3, 2015 at 15:41
  • 6
    @qasdfdsaq What's blatantly obvious for some people might not be for others. Actually, that's kinda the point of this entire site ;-) Sep 4, 2015 at 17:54

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.