17
Site Reported UA
https://duckduckgo.com/?q=what+is+my+user+agent&ia=answer Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.81 Safari/537.36 Vivaldi/5.2.2623.26
https://www.whatismybrowser.com/detect/what-is-my-user-agent/ Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.81 Safari/537.36
https://httpbin.org/get Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.81 Safari/537.36

Analysis

Only DuckDuckGo's own mechanism detects that I'm in fact running Vivaldi, since it has the Vivaldi/5.2.2623.26 part which the other two lack.

How can this be? This truly boggles my mind.

blahdiblah
  • 5,501
Bentch
  • 181

1 Answers1

31

Because the browser sends different User-Agent strings to these websites. There's no real detection going on – the website literally just gets the User-Agent field as a string from an HTTP request header and shows it back to you, so there's nothing stopping the browser from sending a different string in every request if it needs to. (You could use an extension to make the browser send User-Agent: Cake/3.1416 as an HTTP header and all websites would report it back.)

The problem is that some websites care too much about the User-Agent, e.g. they might avoid using certain features in Vivaldi on the grounds of it being "not Chrome" (despite it having those features and even using the same rendering engine), which results in many browsers spoofing their User-Agent to a value that the websites would recognize even if it isn't quite true.

Here's a post on why Vivaldi specifically decided to pretend to be Chrome:

The original Opera (back in the days of Presto engine) already had a submenu for switching between several popular user-agent strings, too (pretending to be Mozilla by default, if I remember correctly). Even Firefox has to modify its UA string on occassion, like here or here.

grawity
  • 501,077