Is It OK To Build Websites That Don’t Work Without Javascript?

Website BuildIn a recent conference talk and follow-up post, developer Nolan Lawson made an argument that drew sharp intakes of breath from many web designers and developers; namely, that building websites that don’t work without JavaScript is perfectly fine.

Lawson got a fair bit of pushback from other developers because the orthodox viewpoint states that building websites that fail without JavaScript excludes a large swath of users. Those with older phones, shaky network connections, and those who simply prefer plain HTML and CSS won’t be able to use a site that depends on JavaScript.

The anti-JS-only argument has a moral component: the people who are least likely to be able to access a JS-only site are those who are already most disadvantaged on the web.

Less affluent people and those in developing nations may not have access to the technology required to provide a good experience on a JS-only site. To make a site depend on JavaScript is to intentionally exclude those people.

It’s impossible to argue that excluding the least-privileged web users is a good thing, but I think that rather than a blanket prohibition against JS-only sites, it’s worth considering each site individually.

At one extreme, it doesn’t make sense to assert that complex web application like Google Docs should be built without requiring JavaScript. The functionality that Google Docs makes available depends on JavaScript.

But nor does it make sense to build a simple blog that won’t load without JavaScript. It may be cool if your blog is a static site the front-end of which is entirely coded in React, but it might be worth asking if you’ve picked the wrong tool for the task at hand.

And then there are all the sites in-between: those that provide some interactive and visual components powered by JavaScript, but that the core functionality of which would work perfectly well without it. For these sites, I think it depends.

Developers may not like being forced to layer enhanced functionality on top of server-rendered HTML and CSS, but it seems unwise to decline to provide progressive functionality in the full knowledge that some users will be excluded if it’s not necessary for the site.

Developers also need to consider that not everyone has the same network access that they have in their office. The most modern smartphone can fail to load JavaScript on an unreliable network connection, and we all have to deal with those from time-to-time.

But modern browsers, including mobile browsers, support JavaScript. By modern I mean anything released in the last few years. For an eCommerce site that only sells to affluent US users, the chances of their being able to load a page that depends on JavaScript approach 100%. That site’s community won’t have a problem, and we build sites for specific communities. If a site owner, after a careful review of their site’s users, decides that JavaScript is necessary to provide the desired experience, there’s nothing intrinsically wrong with that decision.

This is, fortunately, an issue that will be rendered moot as time goes by. Eventually, the least advanced smartphones in use will load JavaScript unproblematically over sufficiently strong networks. That time is a long way in the future, and when we get there, there will be some other new technology to concern us, but that’s the price we pay for progress.

Matthew Davis is a technical writer and Linux geek for Future Hosting.

Dedicated Server Special

Take advantage of our Double RAM offer on the E3-1230v2 4 x 3.30GHz+HT server! Only $134.95 per month. Managed and Unmanaged options available at checkout.