Comment by const_cast

Comment by const_cast 2 days ago

3 replies

I'm sure they exist, I've just never seen them. I use banking and websites like Netflix, too. And, if I had to wager, you could bypass a lot of this "doesn't work on Firefox" by just changing your user agent.

I think it's a case of yes, it does work, but web developers don't think so, so they implement checks just for kicks.

sensanaty 2 days ago

> And, if I had to wager, you could bypass a lot of this "doesn't work on Firefox" by just changing your user agent.

Indeed, even in the codebase at $JOB that I'm responsible for, we have had some instances where we randomly check if people are in Chrome before blocking a browser API that has existed for 2 decades and been baseline widely available. These days 99% of features that users actually care about are pretty widely supported cross-browser, and other than developer laziness there's literally no reason why something like a banking app shouldn't work in any of the big 3.

I guarantee you that if you set your `userAgent` to a Chrome one (or even better yet, a completely generic one that covers all browsers simultaneously, cause most of the time the implementation of these `isChrome` flags is just a dead simple regex that looks for the string `chrome` anywhere in the userAgent), all problems you might've experienced before would vanish, except for perhaps on Google's own websites (though I've never really had issues here other than missing things like those image blur filters in Google Meet, which always felt like a completely artificial, anti-competitive limitation)

  • glandium 2 days ago

    Where did "check feature, not browser name" go?

    • thayne a day ago

      Some developers are lazy. Some probably don't know that that is the right way to do it. There is a lot of legacy code from when checking user agents was more acceptable. It is much more difficult for server code to know the capabilities of the client (although in practice this isn't usually much of an issue).

      Also, sometimes the feature exists so the feature check is positive, but there is a bug in one browser that breaks your functionality, so you put in a user agent check. Then the bug gets fixed, but the user agent check isn't removed for years. I've seen that happen many times.