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
  • 4,873
  • 2
  • 22
  • 30
Bentch
  • 181
  • 1
  • 4
  • In Chrome it is trivial to see what user-agent string your browser is sending to a website. I imagine it's equally simple in Vivaldi. – MonkeyZeus Apr 13 '22 at 14:15

1 Answers1

32

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.

u1686_grawity
  • 426,297
  • 64
  • 894
  • 966
  • 1
    Well, are you saying that Vivaldi deliberately has a hardcoded custom user-agent sent when requesting pages on DuckDuckGo.com as opposed to "most other" websites? – Bentch Apr 12 '22 at 19:14
  • 12
    Yes, that's what I'm saying. It's also what the official Vivaldi blog post is saying (they even name DDG specifically). – u1686_grawity Apr 12 '22 at 19:20
  • 7
    @Bentch it's the other way around. With DDG Vivaldi is freely identifying itself as Vivaldi. It's for the other two sites in the list that it doesn't include `Vivaldi/5.2.2623.26` and "customizes" the UA to make it look like vanilla Chrome/Safari. Note that where the blog specifically mentions DDG, it actually says: "For a handful of sites where we know the label Vivaldi (and our version number) is responsibly used, we will present our full User Agent." and then includes DDG as one of these sane websites. – muru Apr 13 '22 at 07:33
  • Maybe to clarify... Most browsers have a few issues with certain known sites that refuse to "play nicely" with certain browsers. So he browsers "fake it" when requesting pages from those sites. (Without regard to whether the site's problematic issues are intentional/malicious or not.) I see this kind of thing often with sites which return entirely different content to search engines than they do regular users. Sometimes even random gibberish in an attempt to "score high" in the search engine and place their page earlier in the resutls of searches. (coninued...) – C. M. Apr 15 '22 at 22:43
  • I.E.;, the page/site may return many lines references the "physics of space travel" to the GoogleBot or BingBot spiders, but when the site detects a normal user, it returns an advertisement for "Make your man-piece large with our growth pill!" (This example is of the "intentional" kind, but completely accidental issues follow the same patterns.) – C. M. Apr 15 '22 at 22:49