Live data from Hacker News

The IE 11 user-agent forced Mozilla to freeze part of its user-agent string

miketaylr.com

91–100 of 143 posts

Re: The IE 11 user-agent forced Mozilla to freeze part of its user-agent string

#91

Earlier quoted context omitted.

That just sounds like a browser bug though. Client side code shouldn't try to work around it, the website should just notify all users that Chrome is broken and won't play audio properly

Potentially can’t notify either if you don’t have a UA string

You can notify all users until a major browser vendor fixes a known bug without a user agent.

Re: The IE 11 user-agent forced Mozilla to freeze part of its user-agent string

#92
post #33

I know it would be a temporary disaster but I think at this point I wish Safari, FF, Chrome and Edge would just decide on a flag day to get rid of user agents. From March 17th, 2023 (or whatever) all user agent strings are now “WebBrowser/1.0” until the end of time. Just force the switch to better methods.

Permanently end the pattern of rewarding extremely bad behavior from the past. This is so simple and would work.

Re: The IE 11 user-agent forced Mozilla to freeze part of its user-agent string

#93
post #40

Earlier quoted context omitted.

I think, there's still use for it. E.g., I recall when Chrome 32 would fail to play a newly created Web Audio BufferSource, unless the playback call came from inside a decodeAudioData() callback. At the same time, you couldn't use this approach to playback sound from e.g. Safari iOS, since the callback lacked the user interaction blessing, resulting in muted audio. Try-catch wasn't an option either, since, as soon as…

Also this: https://catchjs.com/Blog/SameSiteCookies

Isn't the issue here that a breaking change was introduced in a new standard version that only some browsers implement.

Why can this not be solved with http version numbers instead of a method that allows Google to maintain a seperate standard that it forces developers to switch between with user agent strings?

Re: The IE 11 user-agent forced Mozilla to freeze part of its user-agent string

#94

Earlier quoted context omitted.

I think, there's still use for it. E.g., I recall when Chrome 32 would fail to play a newly created Web Audio BufferSource, unless the playback call came from inside a decodeAudioData() callback. At the same time, you couldn't use this approach to playback sound from e.g. Safari iOS, since the callback lacked the user interaction blessing, resulting in muted audio. Try-catch wasn't an option either, since, as soon as…

That just sounds like a browser bug though. Client side code shouldn't try to work around it, the website should just notify all users that Chrome is broken and won't play audio properly

That's ridiculously naïve. You can't just decide to let your product be broken for 80% of your users because it's technically their browser that's wrong.

I see these kinds of suggestions from technologists surprisingly frequently, and I always wonder if it's a serious suggestion and if the person has ever worked on anything with non-programmers as users.

Re: The IE 11 user-agent forced Mozilla to freeze part of its user-agent string

#96
post #77
post #62

Earlier quoted context omitted.

This is the correct answer. Allow 3rd party analytics or whatever to do as they choose, but your javascript should pretty much never believe a UA string. `if (someFeature && someFeature.someSpecificMethod)...` Or you can try/catch if you are less sympathetic to inferior tech.

This would be sufficient if features were a yes/no binary of supported or not, but sometimes browsers implement features but get them wrong, or incompletely.

Then the features aren't supported in the browser and you should file a bug report to the vendor. Having the developers that use a tool work around the bugs in that tool is a recipe for having millions of repeated lines of code that don't actually solve the problem upstream.

Re: The IE 11 user-agent forced Mozilla to freeze part of its user-agent string

#97

Stop sending User-Agent. Replace it with nothing. Not client hints. Nothing. If sites start rejecting Firefox clients because of that, then instead change it to send exactly the same User-Agent (and other software identification) that Chrome sends, and commit to exactly faking Chrome's signals in the future. The UA header never had any business existing to begin with. Servers guessing client capabilities from the sof…

While I generally agree with you I bristtle at the "just do what chrome does" sentiment. Chrome and Google taken co trol of the standard in ways that generally aren't good for anyone.

I don't think their suggestion was "just do what chrome does", it was "make your browser indistinguishable from chrome so that Google trying to create a seperate browser standard breaks websites for other browsers".

If a website can't tell my browser apart from chrome, it can't attempt to support chrome-specitic features based on the user agent string.

Re: The IE 11 user-agent forced Mozilla to freeze part of its user-agent string

#98

Client Hints are the recommended replacement for UA strings. I believe the default behavior for Chromium browsers is already changing (looking for schedule link). [1] https://developer.mozilla.org/en-US/docs/Web/HTTP/Client_hin...

The issue is that you often want to work around bugs in a browser. For instance, Safari technically supports a lot of features, but very often there are slight inconsistencies with other browsers. Would Safari’s capability be something like “capture-stream-with-bugs”?

Re: The IE 11 user-agent forced Mozilla to freeze part of its user-agent string

#99

Earlier quoted context omitted.

By default, I do not send a UA header. Mind you I use a text-only browser so I am not concerned with "responsive design", which is arguably one legit use for the UA header. The number of sites or hosting providers^1 that actually require a UA header in order to retrieve a webpage, let alone require a specific UA string, is relatively small. IME, they will fit in a short text file.^2 From firsthand experience I know t…

> so I am not concerned with "responsive design", which is arguably one legit use for the UA header. Responsive is specifically designed to work without client hints/detection, so you'd be good there anyways. Specific mobile-only versions of websites is what breaks, and a large part of that is (some?) Wordpress sites.

[deleted]

Re: The IE 11 user-agent forced Mozilla to freeze part of its user-agent string

#100

Earlier quoted context omitted.

I think, there's still use for it. E.g., I recall when Chrome 32 would fail to play a newly created Web Audio BufferSource, unless the playback call came from inside a decodeAudioData() callback. At the same time, you couldn't use this approach to playback sound from e.g. Safari iOS, since the callback lacked the user interaction blessing, resulting in muted audio. Try-catch wasn't an option either, since, as soon as…

That just sounds like a browser bug though. Client side code shouldn't try to work around it, the website should just notify all users that Chrome is broken and won't play audio properly

At that time, about every audio library was broken for 80+% of the users. If you happened to maintain such a library, you received bug reports for sure (on your library). Chrome claimed their new implementation was inside specs, so it was unclear, if there would be a fix. As it happened, the specs were amended/clarified and Chrome returned to the previous behavior a few versions later.
Post reply on HN