Live data from Hacker News

Your website should work without JavaScript (2021)

endtimes.dev

41–50 of 159 posts

Re: Your website should work without JavaScript (2021)

#41
post #32

I guess it depends if your website does something valuable or substantial. If it's just your hobby site... great, develop it without JS. But if it's a site people pay to access (or requires ads) and they expect some functionality - like Youtube or Netflix say - I don't think this is possible.

I’m genuinely curious: why would Netflix or YouTube not work without JS? As far as I understand it, YouTube and Netflix are a nicer UX with JS but there’s no particular feature that would kill it completely. Like, for example, I thought that you can play HLS* manifests from plain HTML5 video tags. EDIT: I was thinking of HLS and not DASH

No browser supports DASH any more; Edge 12–18 did, but that was lost in the Chromium shift. (Source: https://caniuse.com/mpeg-dash.)

But HLS has wide support on mobile browsers, and on desktop Safari. (Source: https://caniuse.com/http-live-streaming.) So YouTube should in theory be able to support JavaScript-free playback for many of its users.

Re: Your website should work without JavaScript (2021)

#42
post #32

Earlier quoted context omitted.

I’m genuinely curious: why would Netflix or YouTube not work without JS? As far as I understand it, YouTube and Netflix are a nicer UX with JS but there’s no particular feature that would kill it completely. Like, for example, I thought that you can play HLS* manifests from plain HTML5 video tags. EDIT: I was thinking of HLS and not DASH

No browser supports DASH any more; Edge 12–18 did, but that was lost in the Chromium shift. (Source: https://caniuse.com/mpeg-dash .) But HLS has wide support on mobile browsers, and on desktop Safari. (Source: https://caniuse.com/http-live-streaming .) So YouTube should in theory be able to support JavaScript-free playback for many of its users.

Whups! Thanks for pointing that out!

Do you think that difference would materially affect whether YouTube or Netflix could exist as a website in a meaningful way without JavaScript?

By meaningful: would it fulfil its core competence of finding videos and streaming them to the browser?

Re: Your website should work without JavaScript (2021)

#43
post #32

I guess it depends if your website does something valuable or substantial. If it's just your hobby site... great, develop it without JS. But if it's a site people pay to access (or requires ads) and they expect some functionality - like Youtube or Netflix say - I don't think this is possible.

I’m genuinely curious: why would Netflix or YouTube not work without JS? As far as I understand it, YouTube and Netflix are a nicer UX with JS but there’s no particular feature that would kill it completely. Like, for example, I thought that you can play HLS* manifests from plain HTML5 video tags. EDIT: I was thinking of HLS and not DASH

Closed captioning would need to be added to the standard video tag. Which IMO is a worthy addition.

Re: Your website should work without JavaScript (2021)

#44

I read HN a lot, this topic always comes up so I said “I’m going to build a site that makes these readers happy. Take all their advice, no JS at all. Everything done in HTML. Everything they’re asking for” Turns out the hardest thing to do is to get people to use your site.

The annoyance features like JS can only cause us to leave a site we were already interested in.

Re: Your website should work without JavaScript (2021)

#45

I would very much like for HTML to incorporate concepts from htmx (particularly more flexible transclusion) so that more dynamic websites and applications can be built entirely in HTML. JavaScript became popular because HTML stopped moving forward as a hypermedia, focusing instead on client-side features that, while certainly nice, didn't increase the expressive power of the format in terms of hypermedia.

Agree, but HTML itself doesn't have and doesn't need "transclusion" when HTML is understood to be an SGML vocabulary and SGML has all these things and more, from basic sharing of headers/footers and other markup fragments [1] to parametric macro expansion and event-based templating [2].

[1]: http://sgmljs.net/docs/producing-html-tutorial/producing-htm...

[2]: http://sgmljs.net/docs/templating.html

(Putting transclusion into quotes here because that term is from Ted Nelson and is possibly ill-defined in a HTML/SGML context)

Re: Your website should work without JavaScript (2021)

#46

I’ve found that the best browsing for me has been a result of disabling HTML and CSS as well. No errors, 0 load time, accessible to anyone even if they don’t have a computer or internet connection. Websites built without JS is cute but if you’re serious about fast, accessible, error-free browsing then using HTML and CSS is really just bloat.

Lol. Fastest browsing ever. Crazy to think that in 2022, we're being advised that sites should work without JavaScript. The percentage of people (actual, real live people) who turn off JS when browsing is probably <1%

Re: Your website should work without JavaScript (2021)

#47
post #42

Earlier quoted context omitted.

No browser supports DASH any more; Edge 12–18 did, but that was lost in the Chromium shift. (Source: https://caniuse.com/mpeg-dash .) But HLS has wide support on mobile browsers, and on desktop Safari. (Source: https://caniuse.com/http-live-streaming .) So YouTube should in theory be able to support JavaScript-free playback for many of its users.

Whups! Thanks for pointing that out! Do you think that difference would materially affect whether YouTube or Netflix could exist as a website in a meaningful way without JavaScript? By meaningful: would it fulfil its core competence of finding videos and streaming them to the browser?

For regular viewers, the only pieces of functionality I can immediately think of that couldn’t readily be done sans-JavaScript are search autocomplete, annotations, end cards, auto-play (to the next video), and maybe quality selection (I’m fuzzy on what HLS actually lets you do, never actually worked with it).

Even things like voting and commenting are fairly straightforward to do basically, though you could do vastly better with an auto-resizing iframe (https://github.com/whatwg/html/issues/555) which would basically allow you to load new content into the document with a click (though it’ll clutter the history and make the back button behave surprisingly, see also https://github.com/whatwg/html/issues/6501 on that).

Re: Your website should work without JavaScript (2021)

#49

Earlier quoted context omitted.

Because that is what new frameworks are doing.

There are situations where JavaScript is being replaced with WebAssembly. There are absolutely no situations where serialised HTML is being replaced with WebAssembly.

I see it all the time. Tons of sites out there are replacing standard HTML with JS and won't even work without JS.

Re: Your website should work without JavaScript (2021)

#50

I would very much like for HTML to incorporate concepts from htmx (particularly more flexible transclusion) so that more dynamic websites and applications can be built entirely in HTML. JavaScript became popular because HTML stopped moving forward as a hypermedia, focusing instead on client-side features that, while certainly nice, didn't increase the expressive power of the format in terms of hypermedia.

Agree, but HTML itself doesn't have and doesn't need "transclusion" when HTML is understood to be an SGML vocabulary and SGML has all these things and more, from basic sharing of headers/footers and other markup fragments [1] to parametric macro expansion and event-based templating [2]. [1]: http://sgmljs.net/docs/producing-html-tutorial/producing-htm... [2]: http://sgmljs.net/docs/templating.html (Putting transclusi…

> when HTML is understood to be an SGML vocabulary and SGML has all these things and more

HTML hasn’t been SGML for a long time, and it’s never going to go back. Understanding it to be an SGML vocabulary would be a serious error. In the context of HTML, what SGML supports is even more irrelevant than it was twenty years ago (and it was pretty thoroughly irrelevant even then).

Post reply on HN