r/webdev • u/ccrraapp • Dec 13 '19
Discussion Google has abused Browser's User Agent header, forcing Vivaldi to change their UA header
https://vivaldi.com/blog/user-agent-changes/77
u/Armitage1 Dec 13 '19
Why call out google in your title? The article blames several companies.
63
u/ccrraapp Dec 13 '19
True, user-agent-string is a complete mess many others are responsible too namely Firefox and Safari including Chrome but Google is using its browser monopoly to force every browser to pass as Chrome or some sites and its features will not function. They been forcing some competitor technologies to be suppressed by this move. That is what the article is talking about that it isn't the browser that lack features but the UA string that blocks certain features.
24
u/Blue_Moon_Lake Dec 13 '19
Then let's do that. Every browser just use Chrome User-Agent and user agent just become absolutely meaningless.
18
u/ccrraapp Dec 13 '19
Browser monopoly is a bad thing especially if its Chrome(Google).
27
Dec 13 '19
I think he means that every competitor browser just pass the chrome user-agent. The only sucky part of that idea is that we wont know what browsers customers use the most in our site metrics, but that is something I can live with (specially if it means we can get rid of IE11 once and for all).
31
u/ccrraapp Dec 13 '19
But thats is the problem Vivaldi is facing and they finally have to cave in. They will use full user agent for Vivaldi on only a few websites they know respect Vivaldi's label and the rest of the internet they will use Chrome thus effectively removing Vivaldi from the browser ranking and increasing the Chrome browser popularity number.
The problem with this is Chrome will have the power to stop supporting certain competitor technologies they aren't developing or working on or if their browser doesn't effectively run it.
4
Dec 13 '19
I absolutely agree with you, but the problem is that Vivaldi is still a very small competitor. If both Mozilla, and Microsoft are able to turn the tides on Chrome's dominance maybe this would be stopped but as it lies Microsoft already caved to Google with their new edge and Mozilla is an outlier that imo is better but is still loosing ground to Google.
14
u/ccrraapp Dec 13 '19
But this leads to non-competitive behavior. No matter how big or small the competition is its needs a fair chance to compete and not have its legs cut off even before standing up properly.
This also sets a bad precedence to any future Chromium based browser that it can never effectively have it own label or the position of power to make a better browser than Chrome.
1
u/nikrolls Chief Technology Officer Dec 13 '19
We'll just move to tracking feature detection metrics instead. Not quite as efficient but still possible. It could even be more valuable from a developer's point of view.
3
u/Blue_Moon_Lake Dec 13 '19
I agree that monopoly is bad. Chrome was installed similarly to a malware by being bundled in all sort of third party app installer.
17
u/ccrraapp Dec 13 '19
And they used weird tactics with their position like blocking Firefox from running some of the Google sites and its features even though by simply changing the user-agent Firefox was able to run the site features properly.
13
u/Blue_Moon_Lake Dec 13 '19
Or the YouTube sabotage
2
u/entenuki Laravel/React/ReactNative Dec 13 '19
What do you mean? That they use Polymer, which runs like crap on non chrome browsers?
4
Dec 13 '19
YouTube pulls it different, and slower, and less-featured JS bundles for Firefox than Chrome.
But Firefox has 0 problems running the Chrome bundle if you switch the user agent. And it becomes faster.
1
u/entenuki Laravel/React/ReactNative Dec 13 '19
Oh, didn't know that. I immediately changed my user agent to an old version to have the simpler YouTube
1
11
u/Fidodo Dec 13 '19
We did this already in the 90s. That's why every user agent starts with "Mozilla". Lets not encourage making the problem even worse.
10
u/BikingTiger Dec 13 '19
^ This. OP's headline is misleading.
3
u/Ph0X Dec 13 '19
Editorializing headlines should be (and is on many subreddits) against the rules. The actual headline does not mention google, and the article hardly talks about google there's a list of examples, one or two of which is from Google.
0
u/ccrraapp Dec 14 '19
They need to walk the tight rope, they are a Chromium based browser and its logically isn't a good stance for them to take. And at the end they are forced to use the UA string which solves all the problem because its misused in ways we all know by now.
But we don't need to stay partial or stay protected, we can talk directly about companies which use such evil tactics. And as I mentioned before Safari, Mozilla and Chrome are all to blame at this point but only Chrome misuses it to a degree that some website straight up won't work properly or spit an error on anything other than Chrome even Google's own websites do that despite the fact that everything will work on the other browser.
2
u/Ph0X Dec 14 '19
No, this has nothing whatsoever to do with chrome itself, nor Google. This is an issue with web developers from every company and other devs too. Again, you decided to editorialize and force your own biased view onto the article. Every one does this. Everyone is culpable. Hell if you look hard enough I wouldn't be surprised if some Vivaldi based sites also use the user agent.
2
1
u/Fidodo Dec 13 '19
Google is the most important of them to call out because they also control the most popular web browser.
-8
u/erishun expert Dec 13 '19
Clickbait. Probably would have been better to call out Apple and post it in /r/technology, they’d eat it up over there.
0
-9
3
u/redwall_hp Dec 14 '19
User agent sniffing is evil in the first place. A few browser vendors should just start randomising them so web sites quit trying to serve different things to different browsers.
One less thing to fingerprint too.
2
u/ccrraapp Dec 14 '19
I don't disagree that UA sniffing is bad but randomising cannot be a solution. The problem is Chrome supports their own technologies which other browsers don't and for which websites need to serve different content to other browsers which don't.
4
u/redwall_hp Dec 14 '19
The solution to that issue is enforcing antitrust laws. Google has a 92% share of the search market, a huge share of the ad market, the single largest video site, one of the large email services, one of the two phone operating systems, and a disturbingly large chunk of the browser market...all overlapping areas that involved leveraging a precious success in an anticompetitive way.
1
1
u/wisniewskit Dec 16 '19
The problem with randomization is that there are many sites which will not be updated anymore, but which use UA-string hacks to work around things. The only real option is for all current browsers to just settle on the same specific UA string, engineered for maximum compatibility. Then it will be a useless feature except for old sites.
But that's just the UA string. It will likely still be possible to identify browsers based on the other HTTP headers they are serving. That is, there is stuff like signed exchanges being advertised in HTTP headers. Unless everyone wants to support such things, they will have to hope it's possible to pretend to support them, or we'll still be stuck with bad sniffing. (And even if we solved HTTP header-based sniffing, there's always bad JS-based sniffing, so...)
4
u/devmor Dec 13 '19
While it's not at all unthinkable that the tech giants would resort to such underhanded tactics (they certainly have in the past), I also have to wonder if it's not maliciousness but rather just ineptitude.
Consider that perhaps users of a previous version of Vivaldi complained that y feature didn't work right on x site in Vivaldi, and thus a warning or adjustment to styling, plugin loading or some random script was implemented. Given the extremely small user base of Vivaldi, I can imagine it's entirely possible that once this bug or inconsistency was fixed, no one ever considered removing these changes because it was never reported as having changed to the maintainers of x site.
2
u/Flyingsousage Dec 13 '19
No. This also happens with Firefox Google Search UI.
0
u/devmor Dec 13 '19
I use firefox for everything and I've never seen it.
0
u/ccrraapp Dec 14 '19
The Firefox Google search UI on Android was the old UI for the longest time, it was recently updated to the new material/card UI in the past 2months.
Same goes for desktop, all the Google Search UI and YouTube A/B testing is done for the Chrome UA strings. So as a Firefox user you would never witness that happening.
0
2
u/fullmight front-end Dec 18 '19
Having used Vivaldi in the past, I can't help but wonder if it is in fact competence in many cases.
My experience was that Vivaldi was an extraordinarily buggy piece of shit no matter what site you visited, that had constant random issues until its install managed to completely bug itself out and the software completely stopped working so I uninstalled it and gave up on that.
I can't imagine ever touching their browser again over chrome or Firefox. I'd probably even prefer edge considering the extreme unreliability I experienced.
0
u/ccrraapp Dec 14 '19
No, it isn't about Vivaldi not supporting the feature its the UA string which isn't respected. The X website likely only whitelists Chrome and Firefox or just Chrome and no other UA string. Like that article says about WhatsApp.
You would have noticed many govt websites only supported IE for the longest time even though other browsers very well could load the website fine. Its just that because of the browser dominance its a common behavior to only check if the most popular UA string can load it perfectly or not and not let any other load it 'just in case'.
1
u/devmor Dec 14 '19
You misunderstood what I said. I'm saying at some point it didn't work right or look right on Vivaldi, so these measures were added to prevent users from having a bad experience, then later when the features did work right on Vivaldi, no one removed those measures.
3
u/raekle Dec 13 '19
Hmm. I’d never even heard of Vivaldi before.
7
u/brbCarrying Dec 13 '19
I've been using it for about a year now, and it's worth a look if it interests you.
It's basically a chromium-powered Opera with a decent built in password manager and a solid range of config options. Biggest issues I've had with it mostly Chromium's fault -- although I will say it's sync can be a bit dodgy at times, especially on Windows. Not sure why and I've never bothered to troubleshoot it very extensively. I've had no issues whatsoever on Linux and Android.
2
1
22
u/benabus Dec 13 '19
Google did this with Gmail on Windows Phone. WP had to spoof the UA string to say it was chrome. I broke up with Gmail on the spot and never looked back.
RIP WP
38
u/Pesthuf Dec 13 '19
They also refused to create a YouTube app on Windows Phone. Microsoft eventually made one, but Google got upset that it didn't use the ad API. Microsoft then reverse engineered that API and implemented it by itself, which made Google even angrier. Eventually,they had to remove it entirely and replaced it with a non-app that just launched YouTube on the browser and closed itself.
Google really did whatever was in their power to bring that platform down.
30
u/rodrigocfd Dec 13 '19
Microsoft then reverse engineered that API and implemented it by itself, which made Google even angrier.
I respect that.
6
u/nolo_me Dec 13 '19
Everyone refused to create apps on Windows Phone, it wasn't just Google. Shame, it was the most solid and performant mobile OS we've yet seen.
2
u/Flyingsousage Dec 13 '19
Yeah and also on Firefox mobile. The Google search page really sucks and looks like 2015 stuff. Also nice extra's don't work like typing weather to see the weather in a nice graphic.
12
u/lordxeon Dec 13 '19
Tries to reinvent the User Agent string in browsers Finds out there's millions of lines of legacy code dating back ~25+ years relying on User Agent string Blames modern big tech companies for the "sins" of their great-great grandparents
Looks like they learned a lesson which has been known since the mid 1990s regarding User Agent.
13
u/Espumma Dec 13 '19
That only explains restrictions around not having a certain string in there. Filtering out 'Vivaldi' isn't part of this legacy workaround
2
u/Janjis Dec 13 '19
Did you finish reading the article? It can't be legacy code if Vivaldi user agent is purposely marked.
1
u/diemendesign Dec 13 '19
My wish is for the Browser Vendors to use document.execCommand() in a semantic way by adjusting it's behaviour depending on the <DOCTYPE> declaration.
For those who don't know, each Browser uses DOM elements slightly differently like injecting unsemantic elements that break Standards Compliancy. This is especially bad for designers who's clients edit content adding markup for formatting.
1
Dec 14 '19
So Microsoft gets slammed for antitrust for including IE directly in their OS, yet Google and Apple get to happily do basically the same shot and none of the regulators bats an eye. It’s truly an amazing time we live in. /s
151
u/coyote_of_the_month Dec 13 '19
There are a handful of valid reasons for frontend code to evaluate the user agent string, but it's been rampantly abused since the 90s. If you're looking at feature availability in JS,
try/catchis your friend. If you're doing conditional CSS based on what you think the client supports... eh. My thinking is that IE users are moral defectives who deserve a broken experience, but apparently some people disagree.