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 collection thoughts & ideas on the subject that have been around my mind.
“Progressive enhancement means that everyone can access the basic content and functionality of a page in any browser, and those without certain browser features may receive a reduced but still functional experience” ― Lighthouse
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.
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 fucking doing it .
“I’m a strong believer in progressive enhancement, but also that each phase of the enhancement needs a user.” Jake ArchibaldAccessibility
Using CSS instead of JS for handling logic & states is just as bad as using HTML’s <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.Performance
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 .