411 comments

[ 3.1 ms ] story [ 298 ms ] thread
Would be intresting to see what would happen if we turn of HTML.
Say what you will about jQuery, but it made graceful degradation easy (and encouraged).

I do miss the days when people considered JavaScript an enhancement and not a dependency.

Vue.js allows to do just that. But also allows to do things like react and angular 1. And is only 30k.
I found that Google actually works better without Javascript. It's much more like the Google of old (c.1998).

One significant enhancement (w/o JS) is that you can type something in the search bar without losing your current results while you're typing.

If you hadn't noticed: can switch this off in the search settings (cog button, I think). Expect to have to do it again every couple of weeks though...
To do this without turning off JS, under Settings > Search Settings > Google Instant Predictions, select "Never show Instant Results"
I turned off cookies and js for encrypted.google.com, used it as default search engine. works like a charm.
I generally agree with what he is saying, but the web has moved beyond the point where its reasonable to expect websites to have JS fallbacks. It is just too prominent now a days.

I've always been a JS hater, though I have to code it frequently.. However, with that said I find the arguments against the language becoming more and more obsolete as the years go on.

It's not becoming obsolete. Because of legacy code, docs and the fact the old behavior is still valid JS, beginners are still completely lost because of this bad design that never been fixed, only compensated by adding things.

Now add the fact that:

- the ecosystem is exploding like a holy grenade, only not as funny

- having to learn what "rebinding this in the closure's callback" is still core to the path to the language understanding.

- you have so many ways to do things, especially asynchronously, and yet no simple way to do simple stuff like removing an item from an array

- pre-processors are used everywhere and you have so many of them

- safari is becoming the new IE6

We are still very much paying the price of the terrible language that is Javascript.

It's not unreasonable to expect hyperlinks or images to work without JS. Fancier stuff sure, but basic navigation through a content only site should be functional without it. This is what HTML does and you have to be profoundly lazy to screw that up.
This is really the problem I think. It's not as much fun to create something that functions properly.

The best FE devs make sure that they create functioning web pages first. Then they go ahead and make them better with some JS. Only the least competent/laziest developers create JS only sites (this is discounting things like JS games etc where there's no text or images, or pretty much anything that can be done in HTML).

I find it frustrating when these devs try to paint the web as something more advanced, or somehow different (seriously, it's not a special snowflake) in order to try to validate their preferred way of working. It's unprofessional to their employers, it's a disservice to themselves and it's a big "screw you!" to their users.

Hence why we now have the movement of pure HTML 5 / CSS 3 among those best FE devs.
My favorite pet peeve is JS links, that aren't actually <a> links, but spans or divs with click handlers, so there's no way to right-click->open in new tab or ctrl-click->open in new tab. It's like intentionally doing something that is harder, and works shittier; I don't get it.
Or my favorite, <a href="javascript:void(0)"...
My favourite pet peeve is the lyrics wikia, which has some css embedded in a <noscript> tag that blocks out the lyrics and replaces it with a "sorry! This site requires javascript" message.
I generally don't use websites that require JS. But I'm probably in a minority.
Not for me, I only use web apps when there are no native alternatives, even though I also do web dev when customers require me to do so.

I take this to extreme on mobile apps, only native ones get into my devices. If it looks like a web widget after being installed, it gets the boot shortly afterwards.

No, it hasn't really. I like JS, but I think the attitude that it's a requirement now really needs to go away. I'm hoping it will when the current generation of more junior FE devs start to grow up and realise their work is about the users and their clients, not about what they want to do.

The article shows quite nicely that it's completely possible to create great websites without the requirement for JS to work well. Make it an enhancement and your users will love you for it. Make your users love you, and your employer/client will love you as well.

> I generally agree with what he is saying

"I’m a 30-something woman living in Berlin, Germany (the famous one, with the wall and stuff)."

https://sonniesedge.co.uk/about/

The page is also titled About Her (link text is the same).
(comment deleted)
One of my clients loads a 4.5 Mb bower.js (including Angular with a lot of components and jQuery), they also include an extra jQuery script, a full jQuery UI and several other scripts on each pageload. Nothing is minimized. The bower file alone has 300k in comments.

The CSS file is also nearly 1 Mb.

It's just a simple website with some forms.

They have 2 developers working on the site, a scrum master, a project manager and 2 testers but somehow they can't find the time to find out which legacy code they can remove.

It's only after I pointed out that they have an exceptionally high bouncerate on their (expensive) Adwords traffic and the slowest pageload time of all their main competitors that I managed to get some priority to optimize their site.

Serious question: are there any tools that can scan a full website for unused code and unused CSS?

Not really an answer to your question, but this might be useful: http://youmightnotneedjquery.com
Yeah. Except you need to do Ajax and fetch doesn't cut it. So new lib. And manipulate the dom with something better then the browser API or you loose your mind. So new lib. Then normalize browser events. Oh wait, you can do that manually. But you are writing a new lib. Eventually the code will grow to be the size of jQuery anyway. Only not as well tested, documented and cached.
> Yeah. Except you need to do Ajax and fetch doesn't cut it. So new lib.

Why doesn't fetch and its polyfill cut it?

Polyfill. So new lib.

And even then. You need to encode params manually.

And of course no middleware, so for special decoding or repeating headers, you end up writting a wrapper.

Programming is mostly creating functions and interfaces to decompose problems into reusable parts where reuse makes sense. Nothing wrong with creating a simple function for making XMLHttpRequests or for fetch API. Most of the time there's no need for the level of generality of jQuery interfaces.

Just by making a function you're not creating a library. Sometimes I find DOM API verbose too. Nevertheless the fix does not need to be a interface like jQuery to completely hide DOM API under another interface. It may be enough to extend the HTMLElement prototype a bit or write a function to "compress" the code a bit and make it more readable.

Just by making a function you're not creating a library.

Have you seen what passes for a library on npm?

> it may be enough to extend the HTMLElement prototype a bit

You lost me here. Anybody extending standard objects cannot be taken seriously.

Do you realize JavaScript is a prototype based programming language? It is a major and very useful feature of the language. There's no reason not to use it. There are some things to be careful about with interop if you need it, but that's it.
We've already learned from our past mistakes changing the prototype of the standard library - the Ruby community learned the same thing with monkey patching their standard lib too. The maintenance overhead far outweighs any immediate benefits.
What maintenance overhead? Current and future costs are reduced by making code simpler and cleaner in the first place by using prototypes efficiently.

Also, to be clear, I'm suggesting adding new methods to DOM object prototypes, not changing behavior of existing methods.

Applications may be able to do this in a controlled manner. Library authors never should.
No, a polyfill is not a library. It's a dozen lines, not a thousand.
> No, a polyfill is not a library

Yes, it is.

> It's a dozen lines, not a thousand

A polyfill can be any size, but there's no size minimum to be a library.

Some people are mistaking a book (actually a module) for a library.
Overly-literal response.

A polyfill is a short snippet to implement a missing feature. Notably almost all recent additions to JS and DOM have been designed to be polyfillable where possible. Generally that means under a thousand lines, by the way.

A library in this context means a set of functionality built on top of the platform, like jQuery, with its own API, etc. "Use a library" and "use a polyfill" are not the same advice.

A polyfill is not a library.

(comment deleted)
> Polyfill. So new lib.

So, you don't like the polyfill, created to the specification. Fine, but depending who you target, you might not need it. Plenty of modern browsers have good support.

> And even then. You need to encode params manually.

Or use the Request constructor.

> And of course no middleware, so for special decoding or repeating headers, you end up writing a wrapper.

Request constructor will let you handle the headers quite nicely.

Also, vast majority of users will have a cached copy of jQuery from Google CDN already.

Now bundling it with the rest of your JS, that's indeed a mistake.

(comment deleted)
CDNs are a lie. The privacy implications outweigh the performance benefits since there are many, many, many CDNs and many, many versions of jQuery. It's rare for users to benefit from caching.
I believe this is true, but the world will only be convinced if there are metrics for this. Are you aware of anything that verifies it?
Also, the performance benefits from free CDNs that you have no service level agreements are unsubstantiated at best, but you'll notice very quickly how much your site is broken when your CDN is over capacity.
> Yeah. Except you need to do Ajax and fetch doesn't cut it. So new lib.

Ah, so this is how front-end got the way it is.

(comment deleted)
You can implement an minimal ajax interface in js (no jquery) in less than 30 LOC. But I grasp what you mean, it not just that. There are other concerns and requirements and you do not want to reinvent the wheel everytime...
I am so sick and tired of this argument. Having done it several times, no, you do not end up with something as big as jQuery, not by a long shot.
As big as jQuery? Gzipped it's 27k, a ridiculously small size.
Ridiculously small? That could take 10 s to download on a 2G network.
Yeah, sure, most sites today are totally browsable in 2G.

Event the damn native APP for hackernews, using only JSON, is not usable in 2G.

For me HN seems to be one of the few websites that is usable on 2G.
Network bandwidth usage is also not the only metric of size we care about. After it's ungzipped, it needs to be parsed by the JS engine, and more code = slower execution.
Sure, if all you do is some onclick() and a few appendChild().

Plus for the time you spend chasing compat issues, writting wrappers, choosing small libs and packing it all together, you could have done your site. For less than 40ko.

People are not blinking at including react ecosysteme, which is huge. But attack jQuery ? Seriously ?

> chasing compat issues, writting wrappers, choosing small libs and packing it all together, you could have done your site.

I don't know about you, but usually my projects last longer than a week, so those sorts of savings don't represent a significant chunk of my overall development time. Also, I'm not a shit programmer, so I can actually write a for loop that does what I want on the first try. I've spent more time trying to figure out jQuery's goofy syntax and what the hell it's doing with AJAX queries than it has ever saved me in development.

>Eventually the code will grow to be the size of jQuery anyway.

Um what? jQuery is huge. You won't possibly use everything in it.

Well, define "huge." It's like 28KB that your user may already have cached if you use a CDN. https://mathiasbynens.be/demo/jquery-size
I meant huge in terms of functionality. It supports so many things that you can't possibly need everything.
Oh. Well that's true, but I think the point is more like you end up implementing some significant subset of that, except with homespun code that isn't tested as well.
Event + Ajax + DOM is most of jQuery. And is most what your webapp is. Now I'm more of a fan of Vue.JS + axios myself. But if I have to go minimal, 40ko of jQuery is nothing and save so much trouble. All the "you don't need jquery" thing is done by people doing prototypes that are not tested on most browser or assess in term or ressource vs reward, which is a lot of the projects in the JS community.
> Except you need to do Ajax and fetch doesn't cut it

curious as to why you think this? fetch is pretty convenient to use. We created our own wrappers around it, but that basically just consists of ajax = (url) => fetch(url).then(res => res.json())

Exactly, you had to write a wrapper. And the next project will do so. And if you want to save time, and improve reliability, you'll test it, and write doc for the 3rd. And the new team member.

Or you can use the few ko of jQuery.

(comment deleted)
Good luck supporting old android browsers, IE and dealing with the inconsistencies between browsers. It only takes one look at the jQuery source code to understand why it's not a good idea to "roll your own jQuery".
Simply don't target old browsers. If people don't use JS, or don't have a modern browser, feel free to go elsewhere. I don't target edge cases as I don't get paid to.
I really envy the industry where you work on. In my industry you can't just ignore half a billion of outdated Android phones and Government seats.
I presume you get paid for this specifically?
That's interesting! Do you know if it is possible to access this data from an extension? I would love an extension that crawls through the website and combines the data for all pages.
Note: The color-coding is likely to change in future Chrome releases. <-- Well, someone eventually found out that some people cannot distinguish red and green, but it was too late :-D

I am a little surprised to find such an issue in Google software as it is a topic for first semester CS undergraduates ;-)

Wait what? CS students learn color about color blindness now? I really wasn't in the good classes!
I think it's a joke.
I actually learned that as a CS student.
If it was actually part of the curriculum I sure hope that it was in some design centered elective class. IMO if your CS degree spent time teaching that as part of the core curriculum, they missed an opportunity to put more Math, PL theory, and interesting algorithms in there, because there's more than can be sanely covered in any one curriculum.

Since it's accessibility based, it's more laudable than teaching CS students how to center a div, but it's not like it really requires a mentor of some sort to express the nuances of, right? Or even if it does, it's still design.

It's some years now, and there were at least two courses in which it could have been. The one was elected, HCI. The other was not, it was an introduction into graphics and audio, and since you need to understand basics of human perception to understand compression in that area (jpg, mp3), they talked about stuff like that.

A good CS degree definitely has the space to teach some basics in that area. To mention Gestaltgesetze, to explain human perception a bit, and give an introduction into usability. You do not get a useful developer in the end otherwise

> You do not get a useful developer in the end otherwise

Not all developers do stuff with UI, and of those that do not all do anything with a UI that is actually graphical beyond a terminal.

> since you need to understand basics of human perception to understand compression in that area (jpg, mp3), they talked about stuff like that.

That is a good reason to teach it, and counters my overly assertive original comment.

I learned that in my 1st year HCI module at University nearly 20 years ago. It shouldn't be a joke. It should be normal.
I taught a ton of a11y stuff in my intro to web classes. Even did screen reader demos. I wasn't the only one. There are lots of folks teaching this stuff. Not a critical mass, but I'm so thankful it's happening. :)
I didn't learn anything graphics-related in my CS degree. Seems like more of a UX or software development topic than a CS topic.
I learned it in both my computer graphics course and my user-interaction design course as part of my CS degree (German university). None of these courses are required, but they are popular enough that the most important lessons were pretty universal knowledge among students.
Seen the same on maps where green is a good route and red is a dangerous route. Switched to a blue -> light blue -> yellow -> orange -> red -> black scale with great success. I also believe chemistry uses blue to mean safe, not green.
On a minified app it only seems to show line-by-line coverage of the minified files and not the source maps :(
You can pretty-print the file through the Sources panel.
Off-topic, but:

> Full-page screenshots. Take a screenshot of the entire page, from the top of the viewport to the bottom.

I'm surprised to see the Chrome developers not know what 'viewport' means.

Even more off topic but I'm surprised this isn't a consumer feature. There are so many sketchy chrome extensions that try and do this.
Even more off topic, but after Firefox (before Chrome) had introduced this feature in dev tools, they also recently introduced it as extension (and it might even work on Chrome)
(comment deleted)
> They have 2 developers working on the site, a scrum master, a project manager and 2 testers

... and daily standups? so busy working that there is no time to do the job

Exactly. And the people around the developers are busy coming up with things that make them look busy.
> Serious question: are there any tools that can scan a full website for unused code and unused CSS?

From my limited knowledge of your situation this seems like the last move to take. I would try the following, in roughly this order:

Serve libraries (Angular, jQuery) from a CDN to at least have the chance of hitting a browser cache on a visitor's first encounter with your site.

Use a minifier to strip all the unnecessary comments and whitespace (in addition to other benefits from minimization).

use gzip to compress the remaining minified files.

Those alone will likely significantly impact your load times. At this point, the remaining dead code should be relatively small and you can look into tools for surgically removing it.

I don't think more powerful tools are the solution here. The problems and solution are obvious. The root problem is that many "product" teams will take any 10x improvement from tooling and adapt by being 10x more inefficient. Because they can.

Hardware (laptops, phones), and browsers js and rendering engines, are all 10x faster than they were 10 years ago, giving 100x to 1000x overall speedup. Think about that, it is truly incredible. But web pages are also 100x larger and less efficient than 10 years ago. This is absolutely not justified by productivity increases. This is just how the world / humans seem to work.

"Work expands to fill the time allocated for its completion." This holds true for computer scripts executing a workload as well.
Developers tend to over time expand their programs to fill available memory and take up available CPU, too. My currently open text editor's memory footprint is apparently 36.6MB, and it is displaying a single file composed of ~1000 characters.
The scary thing is that I actually consider that to be remarkably small. My current Emacs session (recently opened) is just over 200 MB is size. And Emacs isn't even considered a hog anymore compared to the real hogs like Atom.

Remember when Emacs meant Eight Megabytes And Constantly Swapping?

Lol @ testers. How about getting rid of the project manager and testers, and hire 2 decent developers who have some experience with automated testing, continuous integration and continuous delivery instead? Productivity rises 300% I would presume.
> Serious question: are there any tools that can scan a full website for unused code and unused CSS?

We're starting to get there.

JS Modules gives us static exports/imports, so we can statically analytics the dependency graph and identify functions that aren't used and do tree-shaking to remove them. Rollup and Webpack2 already does this, but there's more to go.

CSS Modules creates a contract between the your CSS and what uses it. As you have to import it, and exports are static, you can understand which style files are imported where. Next step would be to understand which classes are used inside that module and strip those that remain unused. This is theoretically possible (providing you use a more 'statically safe' syntax), but tooling hasn't yet popped up to do this.

As for JavaScript, Google Closure Compiler does some dead code elimination (DCE, a.k.a. tree shaking in Lisp lingo) as an optimization but it unfortunately doesn't tell you which parts of the code is dead. It also does not to DCE alone but does some aggressive size optimizations with it so, again unfortunately, it cannot output otherwise-identical code with only DCE applied.

This part is more of a shameless plug, but I believe public/industry/developers should be aware of what tools & techniques academia develops so that the researcher's efforts can be more useful. There are some static analyzers for JavaScript such as JSAI, SAFE, and TAJS (disclaimer: I'm working on a project related to JSAI on the lab which developed it). These static analyzers can discover the dead code if given all the entry points however:

- They don't have facilities to report the dead-code AFAIK (this is a trivial thing to add _in theory_, if there are parts of the program _unvisited_ by any of these, that part of the program is guaranteed to be dead). If somebody wants to add such a facility to any of the tools they are welcome. In case of JSAI, I'm willing to provide them all the information I can.

- They are conservative (e.g. sound) tools and may find too few dead code results.

- They don't play well with `eval` & friends in general although they try their best[0], the web frameworks rely on eval-like highly-dynamic approaches a lot to be generic enough and that hurts precision of such analyses dramatically.

[0]: https://pdfs.semanticscholar.org/8140/feec021818815c55a43b54...

[1]: https://www.cs.purdue.edu/sss/projects/dynjs/eval-TR.pdf

I think the best tool for this job in this specific scenario is simply "rm -rf. /"
Well, while I like what you can build with JS, I often don't like what people build. For example, npm makes it so easy to import megabytes as a dependency to your project while you might only need a few kilobytes. And some devs simply do not seem to care about that.

On the other hand, JS allows us to build great user interfaces which better to use than our old school point and click adventures we use to have. And if you do it right the performance is also ok, but it is also not so hard to fail and ruin the whole user experience by rendering the scene twice every frame ;-)

I actually liked the old point and click adventures better, because you always knew exactly what to expect. There was a fixed suite of tools provided by the browser and that was that. Now... well... every dumbass designer with a bright idea is free to inflict some bit of novelty on you. Fads sweep through the design community and suddenly old sites which worked fine have to be "updated" to work differently, and you have to learn them all over again, for no benefit.
The fact that so many sites fail to even make use of a noscript block (like [0]), boggles my mind.

[0] https://www.google.com/chrome/

Re [0], note that Google Maps on the other hand seems to handle lack of JS very well. I guess it can be blamed on different teams in the same big company.
If by "seems to handle lack of JS very well" you mean "does not work at all", that makes sense. Not being sarcastic either, it seems they decided to take an all or nothing approach and force the user to enable JS to use Google Maps, or instead see this page: https://i.imgur.com/Qc156Ds.png

Maybe the maps product wholly depends on JS for all functionality?

Yeah, my point is that they put actual effort to show you a nice-looking page when viewing Maps without JS enabled. Compare to the Chrome download page, which blanks out. This is orthogonal to whether or not a service can/should work without JS enabled.
NoScript plugin keeps JS off by default and you can turn it on as needed or whitelist certain sites. Highly recommended
Dunno how well it will work after Mozilla drops support for XUL extensions...
NoScript definitely works without XUL support and is the fourth most popular extension listed on the compatibility page here: https://www.arewee10syet.com/

Tested and working, for a while now.

e10s is multi-process, I thought, which is a different animal to the new plug-in framework they are pushing. I'm pretty sure I read no-script will have problems, but that might have been with regards to tree style tabs instead (which is shown to work in the multi process branch)
It's 2017. All modern browsers support JS and it's no longer reasonable to expect all websites to work very well without it.
There are more places to have a browser than on desktop computers, also not everyone wants to waste battery with JavaScript junk, the <blink/> tag of the 21st century.
It's also not reasonable to require JS when you're just displaying static content.
All modern browsers support JS

While that's true it's not reasonable to assume the user has JS enabled. Ad-blocking plugins that also block JS are increasingly common.

and it's no longer reasonable to expect all websites to work very well without it.

The question should be "what does work very well" actually mean?

For a closed application that requires the user to log in I don't really care. Users won't use the app if it doesn't work for them, so it's entirely up the developers to build something the users want. Talking about web applications is silly. For a public-facing website though, I would expect it to at least work without JS even if it doesn't necessarily present as good an experience as it would with JS (which is nothing new, it's just progressive enhancement). The problem is web sites that present an essentially a meaningless page (blank, no content, populated but broken, etc) to users who have JS disabled. That's where work needs to be done.

> That's where work needs to be done.

Why?

Instead of building for 0.5% of users that can just enable JavaScript, why shouldn't I invest the time into building a new feature, writing more unit tests, or writing an app for Windows Phone?

For the same reason we build features in websites that work for blind people (aria tags everywhere), disabled people (accessible buttons), people who speak different languages (i18n), VIM users (GMail keyboard shortcuts), etc. We choose who we build for. If you want to ignore 0.5% of your users then that's your choice, but don't complain when you submit something to HN and get a page of responses saying it doesn't work.
Humoring people who want to turn off JS is not really on the same level as making the page work for people with disabilities.
> While that's true it's not reasonable to assume the user has JS enabled. Ad-blocking plugins that also block JS are increasingly common.

What percentage of users do you think block JavaScript? I'd be utterly shocked if it were more than one or two percent.

It's 2017 and we should be over this "but it works on my machine!" attitude. It's completely reasonable to expect text and images to render without the need for the extra fluff.

  <script src="//cdn.example.org/few-jigabytes-blob-6d96270004515a0486bb7f76196a72b40c55a47f.js"></script>
  <script type="text/javascript">
    import ReactDOM;
  
    const HowQuestion = (text) => {
        return (<p>How {text}?</p>);
    }
    const Comment = () => {
      const text = \
        "the year justifies using Turing-complete programs" 
        "to express what could be a simple static text document";
      return <HowQuestion text={text}/>;
    };

    const el = document.querySelector("#14507550 .comment");
    ReactDOM.render(<Comment />, el);
  </script>
thank you for the reminder that it is current year, all too easy to forget!
Sorry, that was actually last year's. This one's should've been a WebAssembly blob.
I turned off JavaScript and Cookies for all sites a few months ago and only whitelist (or open in another Chrome profile) when they refuse to display or need an authenticated session.

There are some sites that require JS to render, but the great thing is that majority of pages I visit work just fine as plain html/css. In general I feel less distraction from popups, overlays, ads, etc.

I use uMatrix as a substitute for NoScript + uBlock, and while it's a pain to get some sites working manually without bulk-enabling everything on them, I'm mostly happy about it, and the web looks better for me.
I use Noscript and uBlock Matrix together. It's a little annoying to have to double-whitelist pages, but they offer some non-overlapping functionality. uBM has finer whitelisting control, while NS has finer control (and better visibility) over specific kinds of objects on the page.

However, neither offers a UI for whitelisting specific scripts, which I see as an important feature in the Year of the CDN. I think NS has that feature but it's hidden away in the preferences.

I tried using uBlock (EDIT: uMatrix) for a while, but I felt like it was a lot of hassle, and most of the time it still wasn't granular enough to actually block the things I wanted to without breaking sites. It seemed like usually all of the bullshit javascript making sites sluggish came from the same domain as the few bits I might actually want. (Or at least needed to make the site useful.)
> wasn't granular enough to actually block the things I wanted to without breaking sites

I don't understand the criticism: it's no less granular than NoScript. If considering only the dynamic filtering panel[1], it can be argued it's more granular given that one can block inline-script tags only, and also one can block/allow on a per-site basis.

Static and dynamic URL filtering of course allows you to filter on a per-URL basis.

[1] https://github.com/gorhill/uBlock/wiki/Blocking-mode:-medium...

> it's no less granular than NoScript.

Sorry, to clarify, I wasn't comparing uMatrix to NoScript, merely commenting that it didn't seem particularly useful to me when I tried it.

I was considering trying NoScript at some point, but from what you've said, it doesn't sound like it would be much better for my purposes?

The verdict comments on this page are golden. I especially like the NYTimes verdict:

> Verdict: Failing… to not work. Sad!

Delicious.

People should realise that most sites today aren't websites, they're web applications. HTML is just the template/output language. Without JS you would have to download an even crappier, probably Windows only desktop app since it wouldn't be possible to implement the logic.
No, most websites are still websites, and one of the biggest problem on the web is the plague of people who think their website should be an application instead.

Actual web applications, like e.g. office suites, map applications, ect. are obviously extempt from "should work fine without JS" rule.

Are you really trying to say there's no argument to be made that SPA + prerendering is a design pattern with advantages over flat html, even for static content?

Obviously there are disadvantages as well, but it's a tradeoff, and if executed correctly it's one that, as fewer people turn off JS and browsers become better at running web apps, is increasingly becoming worth the complexity for certain use cases.

I think he may well be saying that, and it's actually true. Want to make an SPA for static content? That's fine, but don't kid yourself that it's not worse in every single way. It's not a design pattern either, it's an anti-pattern.
In theory, maybe there is an argument. In practice, most of the time it'll be a pretty bad one.

For me it's about how user-hostile those decisions are. I can understand SPA-s when e.g. the service would be infeasible if all the processing was done server-side. But more often than not, it's just laziness. The devs can deploy a sleek-looking SPA in 5 minutes with their JS toolchain, forever dooming users to download tons of pointless JS that adds nothing valuable to their experience. But who cares, today's zeitgeist is "privatize the profits, socialize the costs".

Think of all those sites with articles and blog posts that blank out if you have JS disabled. There's no reasonable argument to be made that they should be SPA. That's just a case of user-hostile laziness.

> The devs can deploy a sleek-looking SPA in 5 minutes with their JS toolchain

Oh, if that'd be true...

Our experiments with React took quite a lot of time (like, weeks) before we got things in shape. And then some more time before that shape wasn't a pear.

And if the backend is not in JS, server-side rendering is quite a mess.

I'm sure there are arguments. In practice, it seems to have made the web slower and shitter, tho.
If the main work your site is doing is showing pictures and text - and this is still and always will be a large part of the web - the browser has a number of features that work very smoothly and reliably out of the box: scrolling, page history, following a link when it is clicked, right-click save as, searchability, basic accessibility, etc. - and typically much quicker rendering than something which waits for a lot of extra HTTP requests and extra work being done in a VM somewhere.

Reimplementing these features in JS is often pretty feasible, and occasionally there are use cases for it, but it's a lot of additional overhead and it's not at all unusual to introduce bugs that really hurt the UX. (UX is not just adding as much branding as possible on top of vanilla browser behavior.)

The average newspaper website should not load 15 megs of junk from 20 different domains with a massive amount of Angular code just so I can read a single paragraph of plain text. This is an example of a document, it's what the web was made for and browsers already do it well without turning most documents into an SPA.

> as fewer people turn off JS and browsers become better at running web apps

In my anecdotal experience, I am running across more people that are turning off JavaScript, partly because browsers are becoming more bloated and worse at running web apps.

No, most sites today are still flat documents pretending to be "apps"!!!
One thing to consider is that at larger companies, we already have a difficult enough time testing all of our site with JavaScript enabled. Netflix building a version that works without JavaScript is like asking them to build a second website, especially from a QA perspective. When you look at your users and find that .5% of them are not running JavaScript, how do you justify spending the money for that few of people?
Try doing some automated testing, it'll take care of most of the non-JS testing and a lot of the JS enabled testing as well. Explority testing is another thing, that QA really does need to be involved with, but if you can't test static content without human intervention, you have other problems that are nothing to do with whether you have JS turned on or off.
The reason is mobile. While only .5% of your users may be non Javascript users it's highly likely a significant percentage of your users are on mobile and not optimizing for progressive enhancement means a significantly degraded experience for all of them at various times when it fails to load or loads too slowly on a mobile connection.
I can stand slow loads, my phone has wifi after all. But js bloatware doesn't even allow me to scroll without seconds lags and random misclicks due to delayed event dispatch. Me turned js off not because of security concerns, but because most js-only sites are not scrollable beyond the first screen anyway.
To help our (internal) customers better troubleshoot, we're adding HTML responses to our HTTP (web) services. Add a header, a footer, maybe some HATEOS... Starts looking like a barebones web site.
How do you know the percentage. Some stuff you may just never know. I very consciously avoid websites I know use a lot of JS or are bloated on mobile. Mostly news websites.

I often read in subway, where I need to load the page in 3-4 seconds or I'm in the tunnel again without the signal. In some stations I only get 50kbit/s or so.

Most websites don't cut it so I don't even bother. Those who cut it though, I get engaged with more, because I can't go anywhere else without a signal.

In a nice world I would write a scrapper + alternate website that hosts only the content and some simple navigation over plain HTML, preferably with as little CSS as possible. There's the annoyance of copyright though, so no way of making this public.

They can't justify the cost. I wouldn't want them to, anyway. It would mean fewer improvements for their non-crippled site as resources are diverted for the sliver of people who like to be contrarian.
> fewer improvements

so, win-win?

The NoScript extension is the 5th most downloaded extension for Firefox (https://addons.mozilla.org/en-US/firefox/extensions/?sort=us...). If you want to show a blank screen or a broken website to those users, that's up to you. Some of them may really want to see your site, so they might try to figure out which of the twenty domains they should enable, and which of the thirty they should enable after that one doesn't help them. Most will likely click on the back icon and see what's next on the list.
Yes, and Firefox is the 3rd of 4th most used browser at less than 10% (which is bad). So the subset of actual Firefox users that use NoScript is absolutely not worth supporting.
Sure, but we're not talking extreme niche here or anything. It was downloaded by over two million users.
Does NoScript have use cases other than blocking JS?
And the vast majority of those, if they want to use netflix, just whitelist it anyway. The amount of revenue lost must be tiny compared to the costs.
(comment deleted)
Netflix is one of those sites that makes we want to run noscript. I regularly makes firefox unresponsive and eventually popup a "this script is using too many resources". When a large tech company can't create working javscript for a minimally interactive interface then something is seriously wrong.

Less javascript would be an improvement for everyone, not just the noscript users.

Having browsed nearly JS-free for the last two-ish years, aside from a bit of tweaking at the start, I have to say that it has made things a lot faster, more stable, and just much more of a pleasure to navigate. If anyone is interested, I have found that two tools make life a lot easier:

- NoScript, which blocks execution of scripts save for those you whitelist. This means sites that reasonably require JS (e.g. YouTube, Google Maps) can remain functional.

- A bookmarklet that redirects you to the Google text-only cache of the current page, which is great for text-based articles that inexplicably require JS to show content.

(comment deleted)
Would you mind sharing that bookmarklet?
Sure:

    javascript:(function()%7Bvar%20loc%3Dwindow.location%3Bif%20(window.location.protocol%20!%3D%20%22https%3A%22)%7Bloc%3Dwindow.location.toString().replace(%2F%5Ehttp%3A%5C%2F%5C%2F%2F%2C'http%3A%2F%2Fwebcache.googleusercontent.com%2Fsearch%3Fq%3Dcache%3A')%3B%7Delse%7Bloc%3Dwindow.location.toString().replace(%2F%5Ehttps%3A%5C%2F%5C%2F%2F%2C'https%3A%2F%2Fwebcache.googleusercontent.com%2Fsearch%3Fq%3Dcache%3A')%3B%7Dwindow.location.replace(loc%20%2B%20'%26num%3D1%26strip%3D1%26vwsrc%3D0')%7D)()
Glancing at it, it just seems to drop the webcache URL in front of the current page location. Credit to http://www.localseoguide.com/easily-check-the-text-only-cach..., if I recall correctly.
NoScript doesn't actually work half the time; even when you whitelist a site through it the site could well remain busted. Source: bitter experience.
Presumably this occurs when the site uses a CDN for their js libraries (or even their main js). After a few days you start to spot which domains need to be enabled and which can be safely ignored.
Can you whitelist a CDN but only for a specific site?
Best i recall, even if you whitelist a CDN it only comes into action if you whitelist the root domain of the site you are visiting.

Beyond that i guess there is GRE, where you can build "firewall" rules.

For example i have Facebook blocked via it unless i visit Facebook.com directly, thus they don't see me browsing all manner of sites via their like buttons and comment boxes.

Where can we get the bookmarklet from?
My main issue with having no script on is for website checkouts. Especially when buying flight tickets. A lot of sites will introduce new scripts in the middle of a stepper that you didn't need to complete step 1. Now you can't submit step 2 or 3 and when you allow the new scripts the page reloads and you lose all your form data.
>Verdict: Cartography catastrophe.

As much as I hate JavaScript, Google Maps gets a pass. I'm pretty sure the code behind it is thoroughly tested. We can just suck it up and turn JavaScript on for one of the most useful tools from the internet -- how hard is it to find something that whitelists domains to run JS anyway?

Firefox has Noscript, and perhaps another tool i forget the name of (never tested it). Not sure if there is anything similar for Chrome (and the various offshots/rebrands) or Edge, never mind IE or Safari.
uBlock Matrix has very fine whitelisting controls.
Google maps is a useful tool.

It also had a habit of freezing an older (core2) laptop I was still using completely (with Firefox). Not just the browser, the whole OS. Had to power cycle. From time to time I'd forget and go back to Google maps were the cycle would repeat.

Why was I still using a core2? Because it worked fine for almost everything else. Got a better second laptop and no more issues but still... there wasn't anything wrong with the first.

It's probably WebGL-related. Some Firefox update seems to have fixed it for me recently but for quite a while I could only visit Google Maps in a brand new Firefox instance, because any attempt to use it in a well-aged process would crash firefox and emit graphics errors to dmesg. You may have a poorly-supported WebGL stack.
Agreed, I just dusted off an old laptop with 14.04 ubuntu (or maybe it was 14.05) and tried to run a webgl app I'm making off of local host and the whole computer nearly locked up (after updating firefox too). Chrome ran it at 60fps easy with whatever version was installed on the computer three years ago.

Now that I've updated to 16.04 firefox runs better than it did but chrome still blows it away.

There should be something as a fallback, though, surely? Take out all the functionality, by all means, but at least give me a map image. If you can't even get link-to-zoom working to display different images, just give me a map image based on my IP location; give me anything rather than nothing.
Can you do lazy loading with just HTML and CSS? You can load the map around the GPS coordinates you start on, but what if you go 20 miles north? How do you: A) figure out what are the new GPS coordinates that your viewport is looking at? And B) load the map within the viewport centered around the new GPS coordinates that you're looking at without ajax?
How would you "go 20 miles north" without JavaScript? The only sensible way would be by clicking a link, at which point you can load your new tiles.
I think OpenLayers did this a looooooong time ago.
Google maps did this a looooooong time ago.
Even if you could just put in two addresses and get directions, that would be better than nothing.
They did provide a fallback, old MapQuest-like UI without JS until a few years ago. Then they stopped, possibly because of the lack of users.
While I agree with you, I still want to give them points for admitting their failure. It's a cute image, with a cute line that tells you exactly what the problem is.

Compare that to sites where you just get a blank page.

If I recall correctly there was an old version of Google Maps which worked without JS. It was before they replaced the old snappy and functional Google Maps with the bloated and slow app we have now.
> For me it’s a matter of elegance and simplicity over unnecessary complexity.

Simplicity is having one place where the DOM is created and managed, and optimizing for the 99% use case.

Complexity is splitting up DOM rendering over two networked systems for servicing a 1% use case.

Browsers are JS runtimes now. Get over it.

Naw, I will keep running noscript and blocking script by default.

If your site doesn't work, I don't care, I will go to a different one.

I may be the minority now, and while there is some great use of js out there; most of it is bloated, slow, insecure, and often privacy destroying.

I honestly think the security/privacy arguments are the only valid argument against requiring JS as standard.

The idea of browsers sending data that the user has explicitly elected to send (in addition to, if we're being pedantic, that the server put there in the first place) is very compelling in this day and age - only problem being that in order for that to have any meaningful impact on web security in the general case, you'd have to more or less universally deprecate JS support, which would set the web in a very different direction indeed.

What about power consumption as another valid argument? Your battery will last longer without Javascript.
It will last even longer without CSS
And most websites that work without JS also work fine without CSS. Almost like a pattern that can be found in properly built websites.
Why doesn't the market care? Where is the JS-less Facebook/Twitter/Airbnb competitor that blows the customers away with "properly built" websites?
As the number of people that won't put up with the JS crap anymore and start using JS blockers increase, we will see such websites.

Same thing that is happening with ads and ad blockers.

Ad blockers are now going in the other direction with non-intrusive ads being shown.
So far as I know there has been exactly one such ad blocker released, and it was promptly abandoned in favor of the kind of adblockers people actually want to use.

All ads are intrusive to some degree.

In the Facebook case this is supported by Facebook themselves. mbasic.facebook.com :)
WTF? You do realize most of the users on the internet don't even know what CSS/JS is and would be thoroughly displeased at being presented with a page with no styling. They don't appreciate that the rendering is done without JS/CSS. A properly built website is one that caters to most users, not developers or power users concerned about JS being enabled in 2017.
You know - at one time we built plenty of websites - and in some cases applications - using little to no javascript (either it didn't exist, or it was only used for very minimal things) or any CSS (it didn't exist).

So what could we do today? That is - if we purposefully limited ourselves to just basic HTML, and server-side processing, without any (or minimal) CSS or javascript, and only using the (expanded) tag and attribute HTML we have today?

I don't know for sure - but I believe we could create some amazing things.

Think about it this way: Look at what demoscene people are able to create when they put extremely artificial challenges in front of themselves; we could try to do the same - and see what happens?

Perhaps there needs to be a demoscene-like competition space for this kind of stuff (how much can you get done in under 100k browser-side? 10k? 1k? Limit bandwidth to the backend, too, and maybe server-side size of code?).

Just some random thoughts - it might be something I'd have to try myself, but maybe this post might inspire someone to do it as well...

What kind of things are you imagining people would get done with such a limitation?

Recently I was using an expensive mobile connection and I discovered w3m, a text based browser (runs in the terminal). I was amazed at how much faster everything worked.

Most of the sites were still perfectly usable (w3m has pretty good HTML rendering) but some were very difficult to navigate.

My point is, without JS and CSS, the web is just... text.

And when you browse with w3m you realize, that actually the web has always been text. It can be quite refreshing to get all the decorative crap out of the way.

--

edit: I now see you didn't say to remove JS, but to challenge yourself to see how much you can make in a tiny amount of JS. Such competitions exist!

web pages https://a-k-apart.com/

java games http://www.java4k.com/

That would be a valid reason to provide a JS alternative depending on context, not so much a valid argument for JS-free alternatives as standard.

There will always be something you can do to reduce power consumption: expecting (or advocating) JS-free versions of all websites for that reason is a completely arbitrary line to draw.

Not all websites not using JS are good: http://www.theworldsworstwebsiteever.com/

It is not a question about JavaScript or not. It is a question about well developed site.

At least that site loads quickly, doesn't call home with tracking info, or use up all of my expensive mobile bandwidth.
According to my uBlock Origin plugin, this page does use Google Analytics and Easy Counter.
>I may be the minority now,

You will also be in the minority later

Sure, but the he only has to wait for the cycle to swing around again. Browsers will officially turn into JS/WASM runtimes. Sites will balloon until instant delivery is no longer feasible. Browsers will respond by allowing sites to version themselves to aggressively cache client code. Eventually browsers will start offering site-specific-browser features to 'new-modern' sites to combat the extreme waste of Electron and the like.

Someone with political capital and influence in the developer world will realize that the web is still mostly text and design a browser optimized for that use case. It will be hailed as a revolution and people will start preferring it over the 'old-web' for accessing static content like news.

Then under pressure from developers pushing the limits of static content they will include a simple, limited scripting language that promises to facilitate basic interactive elements and start the cycle anew.

We should call it something trendy, maybe 'The River'?

> Browsers are JS runtimes now. Get over it.

Sure, dude, ignore anyone without a machine that can run MBs of JS within a reasonable time.

This is a question about JS vs no JS, not about optimizations of JS.
That is fair, but when was the last time when a js only site was running on optimized JS?
All google products. But it is ridiculous to disregard JavaScript because some people can't write it properly. It is the same as saying that I wouldn't use a browser because I once went to a website that displayed a popup.
There is a massive difference in downloading tonnes of JS every other day because there's a new React bundle and between having annoyance _once_.
It is not ridiculous, machine crippling JS malware is a click a way and you will never know until you click. The safe strategy is JS off by default plus whitelisting.

> wouldn't use a browser because I once went to a website that displayed a popup

you would use a popup blocker though.

> machine crippling JS malware is a click a way

I have been using the internet nearly daily for about 20 years now. I can't recall a single time I clicked on something that gave me "machine crippling JS malware".

Barring some serious security gaps, JS isn't even capable of doing anything more than lock up the browser and maybe send some extremely minimal information about you back to someone elses server.

Crippling in the sense that I have to forcibly kill whatever browser I'm using because it is using 100% cpu and the machine becomes very unresponsive.
> Barring some serious security gaps, JS isn't even capable of doing anything more than lock up the browser and maybe send some extremely minimal information about you back to someone elses server.

Not true. First JavaScript Rowhammer exploit was publicized in 2015: https://www.youtube.com/watch?v=9L5MJ43nbkI

The fastest code is the code which never gets written.
> Sure, dude, ignore anyone without a machine that can run MBs of JS within a reasonable time.

I'd wager 90% can even run the strawman you're building

"Cell phones."

I'm amazed at how many websites there are on my phone that take 15+ seconds to load... and they've clearly been "optimized" for phones in the sense that the site reacts to being on a mobile browser and lays itself out for a phone... if I wait for the whole thing to load.

(I see this less often, but it's also amusing how many sites pop up their "hey, you've been here for three seconds so clearly we are an integral part of your life from now on even though the main page layout isn't actually done rendering, would you please like us on facebook, subscribe to our newsletter, and tell us your mother's maiden name and SSN? [allow this site to use location services [yes] [no]] [allow this site to push notifications to your home screen [yes] [no]] [allow this site to enter your bedroom at 3am to remind you how much it loves you [yes] [no]]" dialog where both the X to close out and the submit button is unreachable, because the position and zoom is fixed and the whole thing is too large.)

Why are you trying to browse the modern Web on your Windows 98 potato from last century?
My core 2 potato^Wlaptop from 2008 can run pretty much everything I throw at it quite well, except for the "modern" web.
What are you throwing at it? Word 2008? Command line? Winamp?
You're not vmg from Twitter, are you? This post is less reasonable than I would expect.
I'd be very interested to see some proper analysis of the difference in speed between HTML/CSS vs just JS, it seems obvious to me that the former would be much faster but then again I know how often "obvious" things are wrong.
Would you prefer that Hacker News reloaded the page every time you voted on a comment?
Even without JS, there are tricks to make the upvote button work without refreshing the page. HN used to do this, not sure if it still does.
Do you have a reference to any of those tricks? Sounds interesting.
You could use a link with a background-image

<style>.vote-42:active{ background-image: url(/api/vote/42) } </style> <a class="vote-42">Vote</a>

I ran a quick test. That actually seems to work, at least in Chrome. Very cool!

https://codepen.io/anon/pen/weMwRz

Realistically, I'd probably never use it because it's so dependent on browser behavior, but still a cool alternative.

As a very general answer, JS webapps will typically be slower on the first load because they require an extra step to show the content.

Subsequently loaded-pages or resources can be significantly faster in webapps however, as they can request (or generate) exactly what they need.

The problem of slow initial loads is being addressed by tools like React by offering server-generated pages on the first load, and then transitioning to JS-based loading for subsequent loads. This offers the best of both worlds.

> Browsers are JS runtimes now. Get over it.

Sorry, I won't. I don't trust you and I won't simply run your code by default. It's not like I actually need whatever your web site wants to provide; there are plenty of other things to do on the internet.

If what you say is true, Gopher needs to make a resurgence, its immune to the kind of cancers riddling the modern web.
100% of users want websites to load faster though - that's a fairly big market share.

Obviously you can't make a web app without JS, but I still think you should minimise JS, or remove it if the site truly is static. It's just a better experience.

Ironically, this articles confirms that investing into the no-JS functionality is becoming less and less important, with those major sites already forcing the user into JS. Why then would you invest your time and money to cater to the "eccentric" 1%?
The article gave the answer to your question as speed.
Because of those 1% the large majority don’t choose to turn it off but don’t have it available for a multitude of reasons outside of their control.
Such as... ?

If you're referring to screen readers, I was under the impression that pretty much all of them execute JS these days. Am I wrong?

You’re not wrong about screen readers, no. I wrote a blog post about this last year[1] but I’ll copy and paste a list of possible reasons from it here:

- script hasn’t finished loading, or has stalled and failed to load completely

- application route is up, but the route to the Content Delivery Network is broken

- user has chosen to install a plugin that interferes with the DOM

- user has been infected with a plugin that interferes with the DOM

- user’s company has a proxy that blocks some or all JavaScript

- user’s hotel is intercepting the connection and injecting broken JavaScript

- user’s telecoms provider is intercepting the connection and injecting broken JavaScript

- user’s country is intercepting the connection and injecting broken JavaScript

- JavaScript code has functions not implemented by your user’s browser (older browsers, proxy browsers)

[1] https://gdstechnology.blog.gov.uk/2016/09/19/why-we-use-prog...

There might be 1 or 2 billion "eccentric" people that rely on old/cheap devices and networks, plus the visually impaired that need to use braille interfaces with little support for dynamic contents.
Looking forward to the author's follow up: "A day without a CPU". I am sick of lazy, profligate coders assuming that my computer is a von Neumann machine. And that just because I run their software, I am happy with it spending billions of my CPU cycles. How did we, as an industry, get to this point!?
What a dumb comment. "A day without JavaScript" is to websites as "A day without a CPU" is to paper books. Documents are not software.
And I was looking forward to the author finishing the slogan.

Because she left it up to the end user, how about "A day without JavaScript is like a day without a brain bleed"?

I spent the first 6000+ days of my life without a CPU, and it mostly worked fine thanks. Even now I spend the occasional day without one.
Simplicity matters, correct:

What is simplest: A full website in Elm, or a website developed in a plethora of HTML, CSS each with at least a handful of libraries?

Well, Elm needs javascript..

All in all: there is not need to be religious about the tech stack.

HTML isn't just simple to the programmer, it's also simple in other ways which gives it unrivalled accessibility (to disabled folks, different browsers and devices, web crawlers). Not sure any SPA framework can compete.
Web crawlers and screen readers have supported Javascript for years. This is an outdated argument.

SPAs can also support traditional URLs for bookmarking, indexing, etc.

Have you tried relying on SPA crawling in practice? As far as I know it's still messed up and hasn't changed in half a decade, but maybe I'm missing something.
Disclaimer: I am, and have been for the last 5 years, a JavaScript developer

My current off-work project is a web application, that is built with Elixir. I've written 0 lines of JS. It feels really good. This is my way of internalizing some of the points made here[0]

[0] http://idlewords.com/talks/website_obesity.htm

Third-party scripts aren't just a performance problem---consider privacy/trackers as well. I gave a talk at LibrePlanet 2017, where one of the things I showed is the drastic effect disabling JavaScript has on third-party scripts, graphed by Lightbeam:

https://mikegerwitz.com/talks/sapsf.pdf (slide 60 / pg 115, "The Web---Mitigations & Anonymity").

There's a bunch of stuff before that slide that's mitigated by JS, including things like ultrasound cross-device tracking and hardware fingerprinting.

I just did the same experiment and, coincidentally, also checked feedly, only to receive a totally blank page. However, a little digging revealed an intent on feedly's part to handle this case. They have a 'feedlyBlocked' element, with content, that is simply fixed to "opacity: 0"; obviously, without javascript enabled, they can't then dynamically display that content. Another approach required.

As an aside, it's very difficult to contact feedly directly, but they do have a uservoice account (https://feedly.uservoice.com).

What is the motivation behind this mentality? Sure there are still webpages on the web, but there are also web apps. Why or even how would you expect a web app to work without JS? Why would you expect developers to spend time writing a non JS version of their app? Before taking on this endeavor, I would prioritize native apps, optimizations of all sorts, adding features, etc. Unless your app is gmail, why would you ever spend time on creating an HTML/CGI based web app? I keep seeing these posts and I just don't get why anyone cares about this.
Which of the sites mentioned in the article would you expect JS to be necessary to use?
I find JS requirements perfectly acceptable for maps, twitter, youtube, and netflix. Particularly maps.
- Twitter, is quite literally, a text based feed. There's no reason for this not to work without JS

- Netflix would depend on what you're doing. Much of it can work just fine as text, images and forms

- Youtube has a lot of text and the videos could be played without JS if they wanted to bother (HTML5 ftw!)

- Maps can also work OK without JS (just without the additional stuff, which is fine for progressive enhancement). Google "google maps without JS" for examples of what other people have done. I'm pretty sure you could also get around JS with pure HTML5 + CSS3, but I have no examples of it

So easy to write this in a comment but none of this is true. Twitter is not a text based feed. If it was, people would still expect it to be iteractive w/o full page reloads. Same goes for all your examples. DHTML happened, and for a reason. It's not going to unhappen.
Wow...just...wow! Look, I don't want to be mean, I understand you believe what you're saying, but, really, just no. You really do not understand how the things you're talking about work. For your own sake, go learn some more before jumping into comment here.
Please don't post unsubstantive personal attacks (which this is) to HN. If you know more than someone else, teach them; then we all learn. If you don't want to do that or don't have time, that's fine, but then please just don't post anything.

Commenting just to condescend about how ignorant someone is, instead of helping them, is lame.

(comment deleted)
"Acceptable" is not the question. I asked for which sites you'd find JS to be necessary.
Maps would be severely limited without JavaScript. However, Twitter, YouTube, and Netflix could just as easily be implemented using standard HTML <form> and <video> tags without much loss of functionality.
The content is the main thing users care about and it should be available as soon as possible even on a low-bandwidth connection, or a low-end device, or using a screen reader. This is what Progressive Enhancement https://en.wikipedia.org/wiki/Progressive_enhancement is about.
Progressive enchancement is a rubbish paradigm because it's incredibly difficult to implement. React isometric rendering has made it slightly easier but it's still one of these catchphrases people throw around lightly until they try it.
I negotiate the javascript issue by using two web browsers -- w3m for reading hypertext and Firefox when I want javascript. I'm fine with my bank or an online store expecting to use my browser as a thin client, but if you require javascript to present your blog, I'm going to find a different blog to read.

This policy makes it pretty much impossible to use social media, because social media is basically blogs-that-require-javascript. I see this as a beneficial side-effect.

http://mbasic.facebook.com if you ever do miss social media this gets you a javascript-free, minimalist version of facebook. I use it all the time on mobile and get hours more battery compared to their app or standard mobile site.
I switched to mbasic the first time the FB application crashed on me on android.