245 points · by goranmoomin · 4y ago · 134 comments
We accept contributions from other sites (e.g., Vimeo, Dailymotion, etc) who wanted to replace their long tail of in the wild embeds prior to Flash removal.
IMO this was good practice to keep the web running smoothly at the time.
It is reminiscent of Windows 95's specific code to see if SimCity is running, and allocate memory differently if it was.
> Jon Ross, who wrote the original version of SimCity for Windows 3.x, told me that he accidentally left a bug in SimCity where he read memory that he had just freed. Yep. It worked fine on Windows 3.x, because the memory never went anywhere. Here’s the amazing part: On beta versions of Windows 95, SimCity wasn’t working in testing. Microsoft tracked down the bug and added specific code to Windows 95 that looks for SimCity. If it finds SimCity running, it runs the memory allocator in a special mode that doesn’t free memory right away. That’s the kind of obsession with backward compatibility that made people willing to upgrade to Windows 95.
from: https://www.joelonsoftware.com/2000/05/24/strategy-letter-ii...
It turns out the world was so small that Microsoft could, probably, inventory less than a hundred products that made 99% users happy.
At large enough scale, 1 in a million is next Tuesday - https://learn.microsoft.com/en-us/archive/blogs/larryosterma...
Backwards compatibility like this is a mistake.
In a way this realization is what's finally making Linux viable for gaming. Instead of expecting developers to bring compatibility and bug fixes, have the system provide it and suddenly you can even have an entire gaming console designed for PC gaming on Linux, thus also giving you enough momentum for developers to make adjustments so their game runs better on the compatibility layer.
It’s not tech debt, it’s a feature.
MacOS and Windows are both full of app-specific hacks to ensure that misbehaving but popular apps continue to work between system versions.
If Windows got a reputation for being incompatible with apps, people wouldn’t upgrade.
iOS doesn’t really have that problem. New phones are always going to come with new operating systems and if your app doesn’t run on the new OS, users are going to blame the app developers.
Also most of the incompatibility with apps and new operating systems comes from developers using unpublished APIs. Apple is very strict about not allowing developers to use unpublished methods [1].
[1] I refuse to use the term “private APIs”. An API is a documented method that the platform vendor documents and promises to support
<embed src="http://www.youtube.com/v/dQw4w9WgXcQ"></embed>
… by roughly translating it into <iframe src="http://www.youtube.com/embed/dQw4w9WgXcQ"></iframe>
Probably also the <object> equivalent, maybe only that and not <embed>, I’m not sure. I never had a great deal to do with those two tags.I don’t know why it has to be done this way. I’d have thought that without this extra code it’d roughly fall back to being an iframe on the original URL, and then YouTube could just check if it’s in a frame and behave as an embed instead of the main UI. But there’s probably a reason why they’ve all done it this kind of way.
You are wrong.
During this broad migration by the browser community away from supporting plugins within embed tags, there was likely some audits of how widely they were relied upon across the web, and compat hacks put in place to account for the most common uses.
It's very likely Youtube removed endpoints after the browser hacks were in place for some time.
"We've known each other for so long"
It's an erosion (however minor, by itself) of the idea of an open standard.
https://github.com/apple/password-manager-resources
Many of these sites are quite obscure.
For being "quite obscure", I've at least heard of most of these sites before. Banks with "maxlength: 8", you love to see it.
In this case, getting those companies to fix their broken code is unrealistic. Less realistic than just providing a whitelist anyway.
Develop Menu > Disable Site-specific Hacks
Firefox also ships a "system" add-on (https://github.com/mozilla-extensions/webcompat-addon) that has interventions and user-agent overrides for many websites. See for yourself in Firefox on about:compat.
Some technologies are so fundamental to the web experience that when they break, the user perceives the browser to be broken, not that technology.
[1]: https://github.com/WebKit/WebKit/commit/049188a35af6c67fa30c...
That said for the most squirrely code in webkit you need to look to JSC where the perf critical and machine abusing code is stuck (though obviously minimized as much as possible). My most terrible contribution there is the parser which uses macros and templates together (parsing JS is extremely perf critical in real world page loading because the parser often has to deal with megs of code, all of which has to be parsed before you can consider executing it and in many places page loading is blocked on said execution)