6 ms·
I daily drive Firefox serving a Chrome User-Agent, out of frustration with a couple applications that work perfectly on Firefox, but because they didn't test on
by OkayPhysicist 1y ago
I daily drive Firefox serving a Chrome User-Agent, out of frustration with a couple applications that work perfectly on Firefox, but because they didn't test on Firefox, they just assume it won't work and block my connection (If there's any Devs at Snapchat who wants a free ticket completion, you can "Add Firefox support" by deleting your UA check)
I noticed this exact thing. While a lot of sites worked perfectly fine when I was informing them I was using Firefox, when I started lying, they ran faster. Drove me nuts.
Frontend Devs: If your code reads the user-agent string for any reason but logging/spying, you're doing it wrong.
- cosmic_cheese 1y agoThis is the natural consequence of the notion at large that non-Blink web engines are lightyears behind, which was never true in the strictest sense and has only become less true with time as the gap has narrowed. Besides that, even if you’re relying on some feature that Chrome has implemented as an early draft spec thing or something, maybe consider toggling off that one feature instead of blocking off the whole app.
- OkayPhysicist 1y agoTo clarify, I didn't mean don't check if the feature you want to use exists on the user's browser. I meant don't come to that conclusion using User-Agent strings. JavaScript makes if very easy to check if a method you want to use exists or not: just check if the function is undefined. If you do it the right way, if/when another browser implements the feature you used, suddenly you support that browser, with no code changes. If you check UAs, then you need to keep tabs on browser updates and manually update your website when features get added to browsers, and you need to check what version people are using because maybe it's out of date, it's a whole thing. What drives me nuts is that the right way is the easy way.
- cosmic_cheese 1y agoWe’re in full agreement here, all I was saying is that the menality that leads to user agent sniffing is likely the idea that engines that aren't Blink are so incapable and will break the site/app so badly that it’s better to just rule out their usage altogether. Checking on a per-function basis (or alternatively, just not insisting on using bleeding edge features in the first place) is absolutely the way to go about avoiding brokeness.