5 ms·
Let's list Youtube's features that could be done with no Javascript * Displaying the video * Controlling the video (although with the browser's default contro
by pikzen 11y ago
Let's list Youtube's features that could be done with no Javascript
* Displaying the video
* Controlling the video (although with the browser's default controls)
* Being logged in
* Listing videos
* Voting
* Commenting
* Suggested videos
* Subscribing
Actually, I can't see a single thing that can't be done without Javascript. It has no complex notification system aside from annotations (and I'm not sure anyone enjoys annotations), nothing that isn't provided by browsers.
But no javascript would require page refreshes, which makes for a worse UX. Eh, we survived refreshes before. Maybe browsers could even agree on a standard to refresh only part of the pages by querying the server themselves. Throw in five lines of JS to save to localStorage the current time on the video and restore it on reload.
- Touche 11y agoOf course it can be done with page refreshes, but it would be a worse user experience to do so.
- ashark 11y agoNot saying it's true in the case of Youtube, but I've noticed recently that going back to lame old creaky page-refreshing HTML+(a little)CSS+a few lines of JS sites with no AJAX that they feel unbelievably fast compared to most AJAX-heavy Angular/Backbone/React/Whatever sites. Ajax was better UX than full page refreshes when it was basically just replacing frames and iframes. It's become bad UX now that template rendering systems and a few hundred KB of code are involved. Actually, I just tried this with modern Gmail in one tab and the basic HTML version in another. It's way, way faster to switch folders/categories in the basic HTML version. It wasn't even close, despite modern Gmail "efficiently" loading just the data it needs and basic HTML refreshing the whole page.
- esailija 11y agoSo you are saying one shouldn't use JS to implement voting and comments but instead voting and comments should interrupt the video and then one uses JavaScript to restore the playback position. You also imply youtube should have waited for 6 years or whatever for video playback to even be possible without client side programming. > Maybe browsers could even agree on a standard to refresh only part of the pages by querying the server themselves. Maybe browsers could also agree on implementing all needed applications in the browser. Then you just make <youtube> tag and you have implemented youtube.
- donatj 11y agoHTTP 204. You send the request, the browser stays where it is. Super simple, and what it was made for. Amazon used to use it quite heavily back in the day.
- esailija 11y agoIs there a spec that the browser must stay where it is? Otherwise I would just use a form targeted to a hidden iframe. Still it's not usable here since you won't see your vote or comment or anything without reloading the entire page.
- donatj 11y agohttps://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html "If the client is a user agent, it SHOULD NOT change its document view" Also, a tiny bit of JS and no ajax can solve that easily.
- esailija 11y agoThe spec language "SHOULD" is not same as "MUST" at all. > Also, a tiny bit of JS and no ajax can solve that easily. No disagreement from me that JS solves these issues.
- eropple 11y ago> The spec language "SHOULD" is not same as "MUST" at all. There are edge case clients that would need to contravene this. Most of those clients don't support JavaScript (or in many cases video) in a meaningful way, making the whole thing moot.
- icebraining 11y agoThe spec language "SHOULD" is not same as "MUST" at all. No, but in practice all major browsers (Firefox, Chrome, IE, Opera and Safari) do so. And it's not like the implementations of JS and its APIs never differ.
- pacomerh 11y agoLet's kill UX and get rid of all the smooth JS interactions and replace them with refreshed pages and native browser controls. Geez... are going backwards here?