3 ms·
Well not all platforms are created equal... it's why you have fall-backs to "Stable but not shiny" for platforms you don't support... or platforms you don't kno
by wernercd 10y ago
Well not all platforms are created equal... it's why you have fall-backs to "Stable but not shiny" for platforms you don't support... or platforms you don't know supports New Shiney Thing (tm).
If you know browser X, Y and Z support HTML5 video - because that's your actively supported platforms... but someone says I'm browser 6... do you push HTML5 video? Or do you fall back to stuff you know works but is years old tech?
If you don't know what Browser 6 is... then you have 2 options: Safe options or Feature Detection.
Safe option: I don't know if you can read HTML5... so I'm going to serve you HTML like it's 1999.
Feature Detection: I'm going to go out of my way to see if you can support random new technologies that I'm using. Can use HTML5? You can? Oh... Here's your scripts... or... You can't? Here's HTML like it's 1999.
The first option is a lot easier. "Unknown? You get 'Safe' tech that's not shiny, optimized or best-of-breed. Known? You get stuff we said we support on platforms we say we support".
Second option requires testing and blending the technology stack based on detected features. Possible - because plenty of people do it - but it's definitely not as easy to support dozens of techs in many many more possible combinations.
It looks like MS took Door #1.
Are you saying you would ship HTML5 code to platforms you don't know support HTML5? Because... that sounds like a recipe to send "broken" code to users because "everything should work the same everywhere" which is something that happens... never.
- jacquesm 10y ago> Are you saying you would ship HTML5 code to platforms you don't know support HTML5? No, I would stick to open standards supported by the vast majority of users until the next wave was supported by the vast majority of users and so on. I would never detect a user agent and make crippling decisions based on the response. And if you do decide to resort to such trickery then you'd better make sure that you extract the maximum out of each platform that presents itself otherwise you open yourself up to claims of favoritism. As for the HTML5 video, given that I've pioneered that stuff and worked very hard to keep the video-on-the-web scene plug-in free and working with all browsers it was with serious reluctance that I eventually switched to H.264 encoded video with flash as the player because to me that was the wrong way to go about it but the market literally demanded it. I suspect that if we had not had flash a proper <video> tag would have been implemented ages ago.
- eridius 10y ago"stick to open standards supported by the vast majority of users" is exactly what you get when the user agent isn't known. It just turns out in this case that it's unoptimized and performs pretty badly.