DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’» is a community of 967,611 amazing developers

We're a place where coders share, stay up-to-date and grow their careers.

Create account Log in
Nathaniel
Nathaniel

Posted on

Do you ever block Javascript?! Why!?

I've been researching reasons to make websites work without javascript.

Generally the reason to do this is for reliability.

Unless your javascript is part of your html. It will be loaded in a seperate request β€” and that request can fail.

Maybe your visitor is going through a tunnel, there's a network error, or they're using a web-extension that breaks your code.

That's not uncommon, in 2013 the gov.uk did a test and found that 1.1% of their visitors weren't running the site's javascript.

However, only 0.2% of their visitors were blocking javascript.

For reasons, I started building my sites with that 0.2% in mind. To make things easy to test I've been using this firefox extension: Disable Javascript

There's also a google chrome version

Anyway, I've found myself blocking javascript on the wayback machine to stop it from injecting elements onto the page that obscure the view of the archived website.

Do you ever block javascript?

Latest comments (3)

Collapse
 
rimutaka profile image
Max

I ask the inverse: do I need JS for this website?

Collapse
 
jscoder17 profile image
Jscoder17

Me: I use js to hack my google classroom.
everyone else: πŸ‘οΈπŸ‘„πŸ‘οΈ

Collapse
 
benstov profile image
benstov

Google crawler is basically loading your page without Javascript enabled (see Google page insights for understanding the significance of having JS to load your website content).
Apart for SEO I currently don't have another reason to disable JS.

Classic DEV Post from 2020:

js visualized

πŸš€βš™οΈ JavaScript Visualized: the JavaScript Engine

As JavaScript devs, we usually don't have to deal with compilers ourselves. However, it's definitely good to know the basics of the JavaScript engine and see how it handles our human-friendly JS code, and turns it into something machines understand! πŸ₯³

Happy coding!