Live data from Hacker News

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

miketaylr.com

121–130 of 143 posts

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

#121
post #28

The title is clickbait. If anyone forced here anything, then it was not IE but - once again - webmasters who don't deserve that "title" ;)

"Webmasters" were told to use XHTML and they massively cried how that they just can't write correct code so they absolutely need sloppy parsers that would analyze the mess of unclosed tags and weirdly placed elements and try to understand the intent.

And the industry gave up. This is essentially the same story.

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

#122
post #59

User agent sniffing is poor practice anyways. Try to use the feature and react according to the browser's abilities. Analytics and similar can sniff all day though. To push browsers to get rid of UA string, we should all use a UA string extension that uses the same string like "DOG-SHIT". That way it'll start showing up in analytics. And if you're trying to date the "data science" girl, spam the app/website with UA s…

Have more fun with your UA strings! Unclosed quotation marks, XXE strings, Shellshock, they might just earn you a bug bounty. Maybe throw in the EICAR test string as well, getting their shitty antivirus to purge the log files may just help protect your privacy!

Nah, you're both wrong. What you really want is social security numbers.

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

#123
post #59

User agent sniffing is poor practice anyways. Try to use the feature and react according to the browser's abilities. Analytics and similar can sniff all day though. To push browsers to get rid of UA string, we should all use a UA string extension that uses the same string like "DOG-SHIT". That way it'll start showing up in analytics. And if you're trying to date the "data science" girl, spam the app/website with UA s…

So it turned out that Chrome 93-95 had a weird issue with the video element: you couldn't replace the source attribute reliably. Unfortunately, that's something that mattered to us, so I had a hack in place that tested the browser version. It's still there in case someone hasn't updated their browser. Testing the feature was simply not possible. It was either that or just let (a large) part of our users get stuck on a frozen screen.

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

#124
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.

That's not possible: it assumes a perfect implementation. As I wrote in another comment: Chrome 93-95 had a weird issue with the video element. You can't test that in JavaScript. The feature exists, it just doesn't work correctly. You sometimes have to work around bugs in certain versions of certain browsers.

> Just force the switch to better methods.

I always thought software developers should have the needs of users in mind, but it turns out it's the other way around.

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

#125
post #120

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...

"recommended"? That's just something that Chrome team created and no other browser vendor is interested in supporting it. Google seems to think that they can use their market dominance to force the idea.

If it’s an improvement, why is that a bad thing? I do expect them to lead if they’re in a dominant position. Sitting idly would be the wasted opportunity.

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

#126
post #124
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.

That's not possible: it assumes a perfect implementation. As I wrote in another comment: Chrome 93-95 had a weird issue with the video element. You can't test that in JavaScript. The feature exists, it just doesn't work correctly. You sometimes have to work around bugs in certain versions of certain browsers. > Just force the switch to better methods. I always thought software developers should have the needs of user…

What if Chrome had other bug that you can't work around? Users just would have to update it. It is that simple.

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

#127
post #59

User agent sniffing is poor practice anyways. Try to use the feature and react according to the browser's abilities. Analytics and similar can sniff all day though. To push browsers to get rid of UA string, we should all use a UA string extension that uses the same string like "DOG-SHIT". That way it'll start showing up in analytics. And if you're trying to date the "data science" girl, spam the app/website with UA s…

Does anyone know of (or work on) an app still doing user-agent sniffing to determine browser features (as in, the sniffing code has been touched in the last ~decade)? If so, why do it that way?

I do.

Lots of `isIOS` and `isSafari` tests in my code. Safari 15 for example cannot correctly apply orientation metadata, and will choke on very big images when using `createImageBitmap` in a thread. No way to find out.

I could probably detect the orientation issue with a small dataURI of an image, but the big image issue is more difficult.

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

#128
post #126
post #124

Earlier quoted context omitted.

That's not possible: it assumes a perfect implementation. As I wrote in another comment: Chrome 93-95 had a weird issue with the video element. You can't test that in JavaScript. The feature exists, it just doesn't work correctly. You sometimes have to work around bugs in certain versions of certain browsers. > Just force the switch to better methods. I always thought software developers should have the needs of user…

What if Chrome had other bug that you can't work around? Users just would have to update it. It is that simple.

Three things:

* Why do you think we can make our users upgrade? We're small, just one of dozens of websites they use per day. And in our line of business, this usually means losing clients (who, BTW, are usually not the end-users).

* How would we even be able to tell them they should upgrade if we can't test the version of their browser?

* It was Chrome 93 to 95. The bug existed for three months in all versions of Chrome. They couldn't update.

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

#129

Are they talking about only MacBook Pros with Intel chips since they reference Butterfly keyboards or is that sarcasm that sort of feels out of place ?

That honestly seemed a little unnecessary and made the whole thing confusing. I read it as: "This is only an issue on a MacBook, assuming that your s key sticks and the date is December 29th, 2022".

I suspect that the only part of that which is true is that the bug only occurs on macOS. The date or a sticky s keys isn't a prerequisite.

What would be more interesting is: Why isn't this an issue on Windows?

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

#130
post #40

Earlier quoted context omitted.

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

This was a huge issue for some of the software I maintain. The link explains the problem really well. User agent sniffing was the only option. We have a lot of end users on older iPads that can't upgrade to a newer browser. These users are the general public, so you can't force them to upgrade devices. We will have to continue to do the user agent sniffing for years to come.

From the link:

> While the double cookie approach is what is recommended by Google, the ASP.NET team concluded otherwise - they found that going with a user-agent sniffing approach would be the safer approach. User-agent sniffing is hard to get right. It's hard to cover all the relevant browsers, and it's hard to do so in a way where you can be reasonably sure it won't break in user-agents of the future. But when someone gets it right, that becomes a readily copiable solution that anyone can use.

Post reply on HN