By Aaron Gustafson CHAPTER 7
The Layer Cake, Revisited
When the Web standards movement was young, we were encouraged to
separate the code controlling our content, presentation and behavior. We
did that in order to make our sites more maintainable, our pages smaller,
and our markup cleaner. And it worked. Amazingly well, in fact.
Progressive enhancement asks that we take that concept a step further
and considers these three layers of the Web standards cake comprising
many smaller layers of experience.
Why? As you’re no doubt keenly aware, the browser ecosystem is in-
credibly diverse. One browser accessing our sites today may only support
a subset of HTML4 tags, while another may support all of HTML4 and
some HTML5, and a third may support only HTML4 and some microfor-
mats. One may support only a handful of CSS2 properties, while another
supports most of CSS2 and CSS3 colors, and a third supports all of that in
addition to CSS3 animations and media queries. JavaScript support is sim-
ilarly all over the map. A quick look at Peter Paul Koch’s Acid 3 test matrix
for WebKit^5 reveals that not all browsers are created equally, even when they
are based on the same underlying rendering engine. Sure, overall standards
support is far better now than it was when I built my first Web page back in
1996, but that doesn’t mean they all support the same standards.
We all know the answer to the classic question: do websites need to
look exactly the same in every browser? The answer is No^6. But why stop
there? We must take it a step further: do websites need to function exactly
the same in every browser? No.
5 http://www.quirksmode.org/webkit_mobile.html
6 http://dowebsitesneedtolookexactlythesameineverybrowser.com
The peanut to Peanut M&M continuum.