4 ms·
All of these can be done with HTML and JS, and (bar maybe clipboard) have worked for years: > 1. One file distribution. > AFAICT HTML5 has no real ability to
by TazeTSchnitzel 11y ago
All of these can be done with HTML and JS, and (bar maybe clipboard) have worked for years:
> 1. One file distribution.
> AFAICT HTML5 has no real ability to do this
We've had this since the 90s, in the form of MIME HTML (.mhtml) files. We also have data: URIs, another approach, which has better browser support.
Nobody ever bothers with this stuff, but it is there and very easy to do. You can literally just open an HTML file in IE, press Ctrl+S and save an MHTML one with all the assets bundled into one.
https://en.wikipedia.org/wiki/MHTML https://en.wikipedia.org/wiki/MHTML
https://en.wikipedia.org/wiki/Data_URI_scheme https://en.wikipedia.org/wiki/Data_URI_scheme
> 2. Easy streaming
This can actually be done in HTML as well, if you execute your JS when the DOM's ready, rather than when the page has loaded. jQuery users have done a very weak form of this for years. Again, though, nobody seems to bother.
https://developer.mozilla.org/en-US/docs/Web/Events/DOMContentLoaded https://developer.mozilla.org/en-US/docs/Web/Events/DOMConte...
> 3. Not running when not visible
> HTML5 has no way to stop an animation when offscreen.
HTML5's had the ability to detect if the window is visible or active for a long time now, but nobody uses it.
https://developer.mozilla.org/en-US/docs/Web/Guide/User_experience/Using_the_Page_Visibility_API https://developer.mozilla.org/en-US/docs/Web/Guide/User_expe...
> 4. Can copy to clipboard
Internet Explorer had this years ago, and you can do this with HTML5 too, it's now standard. Strangely, nobody uses it.
http://stackoverflow.com/a/30810322/736162 http://stackoverflow.com/a/30810322/736162
> And on top of that I can easily block flash. I can't block HTML5 so much :P
NoScript!
https://addons.mozilla.org/en-US/firefox/addon/noscript/?src=search https://addons.mozilla.org/en-US/firefox/addon/noscript/?src...
- riffraff 11y agoMHTML was _awesome_ when I was still using IE. It worked almost flawlessly (probably also cause sites were simpler) and I never understood why other browsers didn't support it.
- TazeTSchnitzel 11y agoIt's been an RFC since at least 18 years ago ([0], preceded by [1]), which makes it all the more odd that some browsers (Firefox particularly) don't support it. There's been an open bug for 16 years :( [2] (and a counterpart for saving for 15: [3]) [0] https://tools.ietf.org/html/rfc2557 https://tools.ietf.org/html/rfc2557 [1] https://tools.ietf.org/html/rfc2110 https://tools.ietf.org/html/rfc2110 [2] https://bugzilla.mozilla.org/show_bug.cgi?id=18764 https://bugzilla.mozilla.org/show_bug.cgi?id=18764 [3] https://bugzilla.mozilla.org/show_bug.cgi?id=40873 https://bugzilla.mozilla.org/show_bug.cgi?id=40873