A couple days ago my Twitter feed lit on fire with a debate around Progressive Enhancement and, specifically, whether websites should work without JS or not.
Today, I’d like to share with you a couple thoughts & ideas on the subject that have been around my mind for a while.
What is Progressive Enhancement?
A progressively enhanced website starts with a baseline of content and functionality, and then increases the richness and complexity of the user experience based on browser capabilities.
This approach is still relevant and useful today. I’m not here to convince you otherwise.
Turns out it’s not as simple as a binary choice.
Remember who you’re building for
I’m quoting myself here: “Pragmatism (not to be confused with plain bad code) should trump idealism every time. After all, we’re not building for ourselves, but for users & businesses.”
Unless you’re working on a personal project, every decision you make as a developer should be done with nothing but two things in mind: the users you’re building for & the business you’re building for. If making the site work without JS is not relevant for the target user base, then save that business time & resources by just not doing it.
Separation of concerns
Using CSS instead of JS for handling logic & states is just as bad as using
<center> tag instead of CSS to center text. It’s not what the language
was meant to do in the first place.
Separation of concerns is still a very valid principle today, and it perfectly fits this scenario.
However, web applications are a whole different story.
Models like offline-first and the app-shell architecture now give us the opportunity to build robust applications with realiably good performance. This is specially important for users with slow, unreliable and spotty internet connections (mostly in developing countries).
You are now faced with a choice: Either drop support for non-js users, or deliver a frustrating, sub-par experience for users with lie-wifi and slow network connections.
Akamai’s rankings for Q3 2015 show 16 countries with an average internet connection speed of less than 5mbps. That includes China, with an average of 3.7mbps, representing about 22% of the total internet population.
So while you should always consider your app’s target market first, it’s worth mentioning that if you ever decide to drop support for non-JS users for the sake of building a more performant and robust web application for those users with poor network connections, maybe the math is on your side.
- It’s not a binary choice. There’s no simple answer to this matter.
- Stay pragmatic. Remember every enhancement needs a user. If there is no user, there is no point.
- “Is It Accessible?” by Scott Ohara
- Progressive Enhancement isn’t dead but it smells funny by Nolan Lawson
Join my newsletter and get articles like this delivered straight into your inbox.