← Back to context

Comment by Panzerschrek

13 hours ago

> A news site doesn't need to do audio processing on my machine and read back the buffer? It doesn't need to use webgl to render triangles to an offscreen buffer?

We should go further. A web-site with mostly static content should not use user-side scripting (Javascript) at all, it's unnecessary for it. It should be required only in rare cases where a site is basically an application and require manually turning it on each time such application is opened.

I think that ship sailed and I'm pragmatic enough to accept it. The web is an application platform, not a web of hypertext content. That's not going to change, and I've given up on the idea to even try to "go back" there. If it worked, you'd just have half of websites be "sites" that work without JS, and half would be "apps" which would require switching on JS? The whole reaosn the web took off as it has is because we removed the distinction between "web app" and "web site". There's no putting that genie back in the bottle.

> A web-site with mostly static content should not use user-side scripting (Javascript) at all

Then sites that want to track will just add some JS. Seems unlikely to help.

Sure, for the most static of static sites. But without JavaScript you can’t even do basic things client-side, such as having some variable-length list of fields in a form. Or customized field validation.

If such client-side behavior counts as “basically an application,” then “applications” is a larger set than seems useful.

  • Theme switchers! My favorite example of why "document-only" sites might need JS. Sure, you can use @media prefers-color-scheme for defaults, and you can do checkbox/radio shenanigans to make it switchable, but there's no way to persist that preference on a static site without JS.

    If you don't care about your site being static then you can track it server side, but that has big implications for his you can just your site. Sticking a little flag in localStorage really is the best solution, if you can get past ideological purity.