Hacker News new | ask | show | jobs
by wolrah 365 days ago
> A better question is why it was never fixed / renamed to proper names.

Because the reason it is the way it is in the first place is compatibility with sites that are doing things objectively wrong already, which makes it really hard to get them to change.

The problem is that poorly designed systems limit access or disable features based on a user-agent allowlist, which is never the right answer. There is no right way to do it because it's always wrong, but people choose to do it anyways.

I'm personally a fan of treating broken sites as broken, but I understand that realistically any "alternative" browser has to deal with all the broken sites designed for whatever came before it because otherwise most normal users won't consider switching.

If I were made King of the Internet for a day and able to enforce any changes I wanted on everyone, all the major browsers would have to change their user-agent string to something totally unique on the same day, intentionally breaking any sites that are doing it wrong for everyone so the broken sites are forced to fix their own nonsense. That'd come maybe two or three decrees down the line from "All ISPs are required to provide a globally routable IPv6 block in accordance with RFC 6177, providing only CGN IPv4 is a capital offense".

2 comments

Personally I’d get rid of the user agent entirely. Stop sending it and let sites query available features rather than check the specific browser version.
There are valid reasons to want to know the specific user agent when working around bugs in old but popular versions, that's why I said a user-agent allowlist for access or advanced functionality was bad. That inevitably breaks any new platforms that haven't been explicitly approved, which is obviously bad. Denying access from or specifically only applying fixes to known bad versions is fine.

Also IMO it's useful as an admin to know what clients your users are using, but I do understand why many would prefer to limit the data shared with the sites you visit.

The abuse of the user agent for tracking and unreasonably blocking browsers - Chrome only websites that work fine when you spoof the user agent - out weighs the usefulness of being able to work around browser specific bugs.

These days old browser versions are for most companies, a problem of the past. IE is well and truly dead, and almost all users have auto updating browsers now.

Websites shouldn't really attempt to fit themselves to the browser, just detect which features are available and if there is some odd browser bug, wait until it's patched if it's affecting a major browser.

When my site says Best viewed in Netscape, I mean Netscape Navigator. The rest of the world may have moved on, but static HTML 3.2 with the blink tag is forever.
Proving my point, user agent allow lists would make it only ever work on Netscape, when the blink tag was supported in Firefox prior to v23 and any of its cousins, as well as Opera prior to v15 (where it switched to Blink and became yet another Chromium derivative). As long as your HTML wasn't total jank dependent on exact bug compatibility with Netscape specifically it should work fine on a wide variety of browsers.
I had many fights with IT over coding to standards. They said, we do, our standard is IE 6.

They earned every ounce of pain for that decision.