by tech234a · 6y ago · 0 comments
Many of these UIs don’t have the controversial changes that Google has recently been implementing, including adding favicons and hiding full URLs.
I also found that there were several different mobile UIs for Google with different navigation schemes and search box styles.
I implemented what I found in a simple Firefox extension that changes the user agent string for Google searches [1].
[1]: https://addons.mozilla.org/en-US/firefox/addon/google-search...
If you a building a webapp, use feature detection not user agent strings.
Now I tend to agree with the general advice that anywhere you can use JS based feature detection, you should prefer that.
But hell, there are times js based feature detection REALLY doesn't cut it.
For example, here's the Chromium team recommending UA based feature detection for handling the SameSite kerfuffle: https://www.chromium.org/updates/same-site/incompatible-clie...
Check out feature detection vs browser detection, it explains some of the challenges to relying on user agent strings.
I think the rule is: detect features, don't rely on unreliable proxies for features.
https://mobile.htmlgoodies.com/html5/client/browser-and-feat...
I used the UA workaround up until near the end of last year, when they broke it and instead replaced with an even more dumbed-down mobile UI. (If you know of a UA which can still "unlock" the old JS-less full-featured UI, please say so!)
I also found another, even simpler mobile UI available with this user agent string, though results seem to be sent through a mobile-formatting proxy operated by Google:
Mozilla/5.0 (PlayBook; U; RIM Tablet OS 2.1.0; en-US) AppleWebKit/536.2+ (KHTML, like Gecko) Version/7.2.1.0 Safari/536.2+