title: Without JavaScript
slug: without-javascript
date: 2017-07-18
lang: en
chapo: Rethink what you are doing from the ground up. Challenge your value(s).

> js;dr = JavaScript required; Didn’t Read.
>
> Pages that are empty without JS: dead to history (archive-org), unreliable for search results (despite any search engine claims of JS support, check it yourself), and thus ignorable. No need to waste time reading or responding.
>
> Also known as, if it’s not curlable, it’s not on the web.
> 
> <cite>*[js;dr = JavaScript required; Didn’t Read](http://tantek.com/2015/069/t1/js-dr-javascript-required-dead)* ([cache](/david/cache/54c056e1f90f272adbbc22bd5e8635f8/))</cite>

*Transcript of a 5 minutes [ignite talk](https://en.wikipedia.org/wiki/Ignite_%28event%29) at the Montreal [accessibility meetup](https://www.meetup.com/fr-FR/a11yMTL/events/241309071/).*

There has been a lot of discussions related to JavaScript within our community. The topic is way more vast than just the accessibility question. I’m here to share with you my own (non-)usage of JavaScript. I’m not deactivating JS completely, actually I’m doing something worse: I combine both [hosts configuration](https://github.com/StevenBlack/hosts/) and [uMatrix](https://github.com/gorhill/uMatrix) to avoid loading most of JavaScript files either from ad-related servers or from content delivery networks (CDNs).

Needless to say that my web is quite empty. My feeling is that one page out of three does not load correctly and one out of ten is left totally blank (e.g. a [documentation for developers](https://developer.uber.com/) that requires JS to be loaded, WTF.). Why on earth do I inflict that to myself?!

There are many reasons actually:

1. Ethics. I’m a Web developer and if I want to fix something I need to be aware of how wide a thing is broken. It impacts my future choices. Really. And it drives interesting discussions with my peers when we have to depend on JS and/or a CDN.
2. Security. Wait, what?! Yes, [about four pages out of ten “include at least one library with a known vulnerability”](https://blog.acolyer.org/2017/03/07/thou-shalt-not-depend-on-me-analysing-the-use-of-outdated-javascript-libraries-on-the-web/) ([cache](/david/cache/666ebda4e267afdfbf97aeb17b7f2526/)). That is just crazy.
3. Tracking. Each and every time you link to a CDN you give all your statistics to another company. Think about it. As a user, I don’t want to be tracked.
4. Connectivity. “All your users are non-JS while they're downloading your JS” famously quoted [Jake Archibald](https://twitter.com/jaffathecake/status/207096228339658752) and there are [a lot more reasons](https://kryogenix.org/code/browser/everyonehasjs.html) for JavaScript not loading correctly (more on that later).
5. Performances. This is just unbelievable how fast a (blank :p) page can render. Ditch your bloated JS and trillions of call to ad-servers and you will not even need AMP.
6. Business. Are we creating a Wealthy Western Web ([part1](https://www.smashingmagazine.com/2017/03/world-wide-web-not-wealthy-western-web-part-1/) ([cache](/david/cache/568bad728250c11de1b89f52296b0035/)), [part2](https://www.smashingmagazine.com/2017/03/world-wide-web-not-wealthy-western-web-part-2/) ([cache](/david/cache/1b0501a28e2d80b8f8dfa3789903b753/))) or do we take into consideration the next billion of users/customers? Hint: they will not have an iPhone 7 with a high bandwidth connection.
7. Empathy (some might say accessibility). Your users can be subject to bad connectivity (transportation, countryside and so on), hanging HTTP requests for sub-resources, under a corporate firewall or worse if a wifi access/provider modifying JS on-the-fly. They can even have addons/plugins altering the DOM in a way you did not anticipate.
8. Empathy. Again. Bad usage of JS can be nauseous/disturbing for people [suffering from ADHD, autism, dyslexia or visually challenged](https://axesslab.com/accessibility-according-to-pwd/) ([cache](/david/cache/b8c48710bfa47017b012c6bcd961ec11/)).

> We’re building on a web littered with too-heavy sites, on an internet that’s unevenly, unequally distributed. That’s why designing a lightweight, inexpensive digital experience is a form of kindness.
>
> <cite>*[Designed lines.](https://ethanmarcotte.com/wrote/designed-lines/)* ([cache](/david/cache/865803be5e65ba063421193f3787ece3/))</cite>

When making something readable/usable is turned into “kindness” by the community, it makes me think that we broke something in our culture. Oh and it makes me cry a little as a Web developer.

The answer to all that is [progressive enhancement](https://jakearchibald.com/2013/progressive-enhancement-still-important/) ([cache](/david/cache/8ab1036c933fd4ae50e8f6a349a928c0/)) even years later. But sometimes you do NOT even need all that. **Rethink what you are doing from the ground up. Challenge your value(s).** And remember that [“We’re all just temporarily abled.”](http://uxmag.com/articles/we-re-just-temporarily-abled) ([cache](/david/cache/257acc9fe0cdbf4c75e913ee0bbc89b4/)), let’s stop shooting ourselves in the foot each and every day.

> I do think modern web development has gone down a deeply unwise path. Only through exercising our personal choices can we bring it back. We have mostly stopped the web from being a hellhole of shitty punch the money adverts by blocking the living shit out of adverts. JavaScript is becoming the new conduit for awfulness. I like the web too much to have to endure any more of it when not strictly necessary.
>
> <cite>*[Why I’m turning JavaScript off by default](https://tommorris.org/posts/8677)* ([cache](/david/cache/2e88519b5d93416e448efa463ade7e12/))</cite>
