New Perspectives On Web Design

(C. Jardin) #1

CHAPTER 5 Robust, Responsible, Responsive Web Design


It’s not hard to find figures about the number of users that have
thrown the sparking knife-switch buried in their browser preferences
and disabled JavaScript completely. As you might have guessed, it’s
fairly rare — and those figures are usually accompanied by a call to
abandon progressive enhancement and cater only to the highest common
denominator. But support on the Web is rarely a binary thing — even if we
were to assume that a very low percentage of our users will have JavaScript
disabled wholesale, relying on JavaScript for the core functionality of a site
introduces a tremendous point of failure.
In chapter seven, Aaron Gustafson will discuss some of the situations
where JavaScript might not be readily available to your users, but this point
bears repeating. I don’t have to tell you guys how atrocious the code is in
most of those third-party share widgets or advertisements. What happens
when your user clicks on something while waiting for a megabyte of the
“Like” button to download? What happens when one of your ad tags is so
catastrophically broken that the browser gives up on JavaScript altogether?
Will your site function at all?
Saying that everyone has JavaScript enabled isn’t much more than
an excuse for developer convenience — it doesn’t improve the users’
experiences, just ours. Even if we could assume that a site that completely
relies on JavaScript will work for every user, we’re still not doing them any
favors. We’re still introducing the potential for a user to find themselves
staring at an indefinite loading GIF or an empty page — frustrating things
we’ve all seen plenty of times, even here, with fast and reliable internet
connections. I’ve personally seen a number of otherwise brilliantly
constructed sites time out or display a blank page as a result of an ad-
blocking browser plugin: a single point of failure that halts the execution
of every other script on the page, rendering the entire site unusable.
Granted, this is little more than an inconvenience for you and me.
We can safely pinpoint where a problem like that comes from and work
around it. For less tech-savvy users, what might only be an inconvenience
for us could mean a complete loss of access to a page or an entire site.
Free download pdf