News for hackers. Stuff that matters.
Re:Firefox 95 Released by Nextgrid on Tuesday December 07, 2021 @06:08PM (#29479335)
I wonder why they bother with user-agents in the first place. It's more of a fingerprinting vector than anything else, especially considering Firefox's browser marketshare.

Just hardcode it to Chrome's once and for all.

Re:Firefox 95 Released by streptomycin on Tuesday December 07, 2021 @06:11PM (#29479356)
Sometimes browsers have bugs that cannot be identified with feature detection, in which case the user agent is all we have to know when to work around those bugs.
Re:Firefox 95 Released by foxrider on Tuesday December 07, 2021 @06:43PM (#29479633)
I feel like with the modern rate of browser development by the time you have identified and fixed the bug the fix may no longer be relevant
Re:Firefox 95 Released by tomxor on Tuesday December 07, 2021 @06:53PM (#29479735)
This^

I like Firefox, but it's the only browser to blindly follow the questionable and backwards incompatible parts of the SVG-2 spec... I challenge anyone to identify that SVG-2 <use> is implemented instead of SVG-1 <use> without parsing the useragent string.

The former is backwards incompatible (implemented in Firefox) and will render some nice black shapes if you've previously relied upon target context CSS rules for inheritance that have been supported by SVG-1 for the last decade. AFAIK you can only see this in the output since the inside of the <use> element is a shadow DOM inaccessible to JavaScript, so you cannot determine computed styles. For this reason I wrote an "unpolyfill" [0] that implements some of SVG-1 <use> elements with mutation-observers in JS, albeit in a not 100% correct way. Even so, it still needs to be explicitly enabled, depending one something else to parse the useragent string.

We enjoy far more consistency than a decade ago, but browsers are incredibly complex, and there will no doubt continue to be obscure differences that are difficult or impossible to detect programmatically. Rendering differences most of all.

[0] https://github.com/ThomasBrierley/svg2use-unpolyfill

Re:Firefox 95 Released by RF_Savage on Tuesday December 07, 2021 @06:23PM (#29479470)
Heh, user-agents have been like that since the start. Almost all modern browsers start their user-agent with "Mozilla/", so we are back to the beginning in that regard. And naturally it is for the same reasons too!