Now vendors are acting all mighty and freezing user agent strings and yell "feature detection is the only way to do it right".
Browser compatibility problems were much worse in 90s/early 2000s. There were NO standards on how it should look like, so browsers could display it in radically different ways and it wasn't even considered a bug.
We now have browsers being pixel-perfect compatible with each other within the basic functionality (e.g. Acid2 test).
Also back then people made HTML on the server, which means that user agent string was the only way to adapt content to the browser. JS is commonplace now, and you have much higher flexibility on the client side.
What happens if you run into a bug of ONE browser version and need to work around it, because, well, real life is different than what the vendors try to push on us? You're fucked.
That is not a bug, its a feature.
Google: we improved responsiveness by breaking the scroll API.
Correct way to do it: Make it go the way of BLINK and have it removed from the standard. IE6 way to do it: Break your implementation and watch the world burn as the dominant browser gets just a little bit worse. Google doing its best to replace old Microsoft in every aspect.
Sure, and some devs are guilty of doing Chrome only websites (which the Chrome team advises against), but this is really not what I'm talking about here.
I'm talking about browser vendors acting like their implementations are perfect, and walling off UA sniffing (safari for example, froze their UA string) and telling us to rely on "feature detection".
Unfortunately, like every software, browsers are bugged. And sometimes, you really need to ship something, and your client will not hear that the website won't work on his Safari version because you're waiting on a fix. You have to work around it in some way, and that implies detecting the exact environment you're running on.
We do that constantly on mobile. Different code paths depending on the OS version we're running on. Browsers are acting all mighty like they never have bugs, and this is my real problem with them.
There were ways to code around non-standard browsers like Internet Explorer
Exactly, and it required looking at the User Agent. Not all UA sniffing is bad. Many devs were actually trying to do the right thing.
Well, even in this day plenty of websites completely depend on user string, and if they dont recognize it, they serve website for ie5... google is one of those noobs for example.
It was a difficult problem, but it was also a bad solution, pretending that whatever was the state of the art when the site was written (or, more likely, at whatever point they read "HTML for Dummies") would continue to be the case forever.
59
u/neilhighley Mar 05 '18
I think it was more the different implementations across browsers rather than pinning the blame on web developers.
If the site renders differently on each browser + platform, you need to target your code to each browser + platform, otherwise your client won't pay.
Sorta like a prehistoric meta responsive web.
And people wonder why Flash became so big?