Menu

Permanent Tourist

A personal website by Mark Howells-Mead

The JavaScript argument is racist

The battle royal du jour in the web development community is the argument of whether websites should be built with a JavaScript-based technology like AngularJS, Node.js or React, or using the classic composition of HTML and CSS, then extending it with JavaScript for those browsers which support it.

Without reading the detailed arguments from informed developers on both sides of the argument, the point from one side seems to be that it’s OK to build websites which are dependent on JavaScript, while the “other side” says that websites should work, perhaps to a simpler degree, even if JavaScript isn’t available. If JavaScript files are correctly loaded bug-free, then the advanced functionality should then become instantly available and enhance the site.

The argument is equivalent to racism: developers in each camp are prone to try and apply their best practice scenario to all websites, instead of realizing that there are different types of site or online app; different audiences with different requirements.

You can’t paint all websites with a single brush. Many solutions – like webmail access – are applications running in a web browser, not websites. These apps are complex. Because of their myriad functionality, they should run with JavaScript, allow users to work offline, automatically synchronize their data to a server when online, and be able to store reusable data in the users web browser to speed up the performance of the app to break-neck speed.

Your blog, or the website of the local bakery, needs to be able to run without JavaScript. The audience is different and the function of the website is different: it presents comparatively static information which should be found and indexed to a great level of detail by search engines. Adding functionality to these sites using JavaScript is an add-on: a “nice-to-have” extra, which is available almost always but which isn’t essential to someone who wants to find out the bread of the week or the blog author’s email address.

Nolan Lawson has written this article to explain the cases in more detail. To paraphrase:

The web has fundamentally changed. It’s expanded. It’s blossomed. There are more people building more kinds of websites than ever before, and no one-size-fits-all set of “best practices” can cut the mustard anymore.