March 25th, 2005

When I first went to work at the dot-com, Skyfish, too many years ago, I was faced with an application that had a partial interface, little back end development, and that had cost the investors 1.5 million dollars I believe it was (might have been 2 million — hard to keep track in those days). Where did the money go was the question, and the answer was: it went on building lots of graphics and a really fancy Dynamic HTML (or DHTML or HTML and script) page navigation.

Well, the first thing we had to do, after firing the design company, was pull the DHTML out and revert to plain links for the menu. Why? Because DHTML menus don't degrade gracefully.

I first heard about DHTML from Scott Isaacs at an invitation-only author introduction to the technology held at Microsoft's campus. I remember when he–or actually, I think it was the program manager who did the demo–clicked on a name in a web page, and the space beneath opened up and more content was shown.

I was floored. I was astounded. I was in love. Up to that point, the only dynamic component of a web page was BLINK or an animated GIF, and neither of these was particularly helpful from a professional stand point.

In the months that followed, as the technology of CSS-P, as it was known then, was released, I spent an amazing amount of time working with it; I was sure it was going to revolutionize everything we knew about web page design. In fact, it was at that time that I became heavily involved with ASP, and between the two–DHTML for the front and ASP for the back–I felt that this was it: we could close the book on innovation, tell the other contenders they could go home now.

Well, it wasn't long before cracks in this little nirvana started to develop. Whatever cooperation existed between Microsoft and Netscape at the rollout of CSS-P died a rather painful death, and we started having to deal with a thing called "cross-browser compatibility"–making stuff work in multiple browsers.

Microsoft really drove the browser market, too. Too fast and too far, and sucking people in right and left away from the Netscape browser, Navigator, to IE. The frenzied pace splintered the browser market and left us with a legacy of non-standard, proprietary extensions that haunted us for years. And then when Microsoft had us, they dumped us.

Compatibility across browsers wasn't the only problem; we also had to worry about making pages work across browser versions. I remember about two years ago, when someone using Navigator 4.x asked me to change something in my weblog and I said, enough is enough, I'm no longer supporting a browser that was released six years ago. Now, I feel that way about IE.

Compatibility issues aside, other problems started to pop up in regards to DHTML. Screen readers for the blind disabled JavaScript, and still do as far as I know (I haven't tried a screen reader lately). In addition, security problems, as well as pop-up ads, have forced many people to turn off JavaScript–and keep it off.

(Search engines also have problems with DHTML based linking systems.)

The end result of all these issues–compatibility, accessibility, and security–is a fundamental rule of web page design: whatever technology you use to build a web page has to degrade, gracefully.

What does degrade, gracefully, mean? It means that a technology such as Javascript or DHTML cannot be used for critical functionality; not unless there's an easy to access alternative.

For instance, the main use I make of JavaScript and DHTML in my weblog is the live preview and spell check for comments. Now, neither of these is critical for people wanting to leave comments, and this means my site meets one requirement of the fundamental rule: the page can degrade. However, I made a design error when I added the live preview text area and Check Spelling button, in that I didn't degrade gracefully: the Check Spelling button still shows, as does the live preview area. If JS is not enabled, these should not show. (It's now an item on my to-do list.)

Whatever holds for DHTML also holds for Ajax. Some of the applications that have been identified as Ajax-enabled are flickr and Google's suite of project apps. To test how well both degrade, I turned off my JavaScript to see how they do.

Flickr was a delight and an example of a web page that not only degraded gracefully, if it were a dancer, it would be the prima ballerina. As an example of this, there is an option on each photo page for the photo owner to add tags. Clicking the option instantly opens up a set of text boxes to add new tags. This is using DHTML, and very handy.

However, when you turn JavaScript, and hence DHTML, off, this option isn't there, but you can easily edit tags and other information by clicking the edit link below. Flickr used DHTML to enhance the user experience, but never once built a dependence on the technology to drive the user experience. More, if you access the page without JavaScript, you'll never know that you're 'missing out' by doing so. Lovely use of technology.

Google's gmail, on the other hand, did degrade, but did not do so gracefully. If you turn off JavaScript and access the gmail page, you'll get a plain, rather ugly page that makes a statement that the primary gmail page requires JavaScript, either turn this on, get a JS enabled browser, or go to the plain HTML version.

Even when you're in the plain HTML version, a prominent line at the top keeps stating how much better gmail is with a Javascript enabled browser. In short, Google's gmail degrades, by providing a plain HTML alternative, but it didn't do so gracefully; not unless you call rubbing the customer's nose in their lack of JS capability "graceful".

You don't even get this message with Google Suggest; it just doesn't work (but you can still use it like a regular search page). As for Google Maps? Not a chance–it is a pure DHTML page, completely dependent on JavaScript. However, Mapquest still works, and works just as well with JS as without.

(Bloglines also doesn't degrade gracefully — the subscription is based on a JavaScript enabled tree. Wordpress, and hence Wordform, does degrade gracefully.)

If we're going to get excited about new uses of existing technology, such as those that make up the concept of Ajax, then we should keep in mind the rule of degrading gracefully: Flickr is an example of a company that understands the principle of degrading gracefully; Google is an example of a company, that doesn't.

Update: As Doug mentions in comments, flickr is dependent on Flash. If Flash is not installed, it does not degrade gracefully.

Sigh, there goes my prima ballerina.

Comments
1
Doug - 12:18 am 3/26/2005

When I go to Flickr, I don't get to see the pictures. Flickr without the pictures is kind of useless, eh?

The reason that I don't get to see the pictures is… some time ago I got seriously annoyed at all of the Flash ads that shouted at me, and so I no longer have Flash installed.

Flickr does not degrade at all gracefully in the absence of Flash.

2
Shelley - 12:32 am 3/26/2005

Whoa, I didn't test this, Doug. I didn't pay attention to the fact that the regular photo pages were Flash dependent.

Well, there goes my prima ballarina.

3

All this reminiscing brings back bad memories of my brief career as a DHTML programmer and the importane of degrading gracefully. Back in 1999 I was hired by the marketing director of a dot-de (the German version of dot-com). He wanted pop-up menus with grey backgrounds and thin black rounded outlines, like cartoon speech bubbles, that expanded as one opened up new levels.

After weeks of effort, I had a system that worked in both NS4 and IE5. Each menu point was a graphic (font matching corporate identity) surrounded by graphics for the outlines. Everything was preloaded and was fast enough.

Except for one thing. NS4 would occasionally, randomly and unexplainably crash. Hard.

My boss loved his design and ordered me to keep it and find a workaround for Netscape. Which was, of course, impossible. There was no way out. In the end, I was removed from marketing, put into the service/support department, and ordered by my new boss to remove the dynamic menus. I happily complied.

And the afternoon before we launched the website, my wife told me that she was pregnant…

4

Is there a point to flash other than adverts and silly internet memes? I think I might follow Doug's lead here. I have Java off but JavaScript on (running Safari and occasionally FireFox) and have a pretty good web experience.

5
Bud Gibson - 7:29 am 3/26/2005

An interesting additional point is search engine visibility. Search is built for the page model, the idea that there is addressable content at the end of specific URL. When content is now at the end of what are effectively function calls, how does search find it.

I suppose the REST interface may help, BUT there is not necessarily a link to the content in the pages as you point out.

6

If you use Firefox and Greasemonkey, you can install my just-written Degradr script to replace the flash with plain images on flickr. That, ironically, requires JavaScript and is not at all cross-browser, but I thought it might be useful to some people.

Also, I don't believe "inventation" is a word, though maybe it should be.

7
Shelley - 11:48 am 3/26/2005

Scott, I've been in your situation and hear you. What's frustrating with these situations is you have people who have no idea of how the technology works, but who just know that if you only applied yourself, you could 'make it work'.

Nicholas, I think Flash makes good secondary pages, for doing demonstrations, or just having fun. But no, this current fixation on Flash for important components of a page is bothersome. There isn't an ad for a web page designer that doesn't mention 'use of Flash' now.

Bud, that's primarily why Wordpress and other dynamic weblogs use htaccess to create search page friendly URLs. But in the case of JS, the problems occur when you use JS to capture mouse clicks and then a JS program to open pages.

I'll try out your script, Scott. And thanks for the note, corrected the word (and some other problems in the text).

8
Bud Gibson - 7:57 am 3/27/2005

Bud, that’s primarily why Wordpress and other dynamic weblogs use htaccess to create search page friendly URLs. But in the case of JS, the problems occur when you use JS to capture mouse clicks and then a JS program to open pages.Shelley

Shelley, the last about using JS was in fact the point I was trying to make. At the IA Summit this year, there was much discussion about the death of the page model. In this post, you were really raising within site navigation issues with the assumption that people might actually be navigating around within sites to find content. Well, in many cases, no. They are arriving there by search engines. In other words, the search engine is fulfilling the role of the site navigation menu. If important content elements of your site are hidden from search engines because they are only referenced through JS, you're in trouble.

On another note, the live preview element of this site is great.

9
memer - 8:57 am 3/27/2005

I once fooled with DHTML years ago, too, but not anywhere near to the extent you did. My head exploded very early on. I am in awe of and shocked by the retentive detail the wizards at Dynamic Drive put into their scripts; they take the time to check all the way around, forwards and back to make sure their scripts work well. They are paragons of patience or possess an ocd-like sticktoitiveness to get it right. That kind of coding was never for the likes of me.

If bells and whistles are central to the best functionality of your site, perhaps the only graceful way to degrade is to have a completely noise-free version with an encouragement to "upgrade" — just as Google's done. I'm betting the majority of those who've turned off JS do so voluntarily, not out of necessity. That's why I don't find their notice, "You are currently viewing Gmail in basic HTML," with a link beside it to switch to standard view so ungraceful. They didn't say, "Hie thee the javaScript, foo!" Just the opposite, to me, it seems the basic look/feel is almost exactly the same as the tricked out version.

What we should have is a way to selectively turn these features (like JS, and remember when some ppl used to browse with no graphics so it would be faster?) off/on like how we can selectively unblock popups for certain sites.

10

"Flickr does not degrade at all gracefully in the absence of Flash."

What? Really? I don't have Flash installed (not disabled, I've never had it on this PC), or any Greasemonkey scripts, and I see every photo just fine. I can't annotate them sure, I don't expect to be able to; but I can still add to favourites and all that. I don't know what you're seeing, but it sure ain't what I'm seeing :)

11
Doug - 12:54 pm 4/12/2005

Interesting, Phil. I went back and checked, and I'm still seeing no picture.

Except… if I ALSO disable JavaScript, then I get the picture, along with the suggestion "To take full advantage of Flickr, you should use a JavaScript-enabled browser and install the latest version of the Macromedia Flash Player." So apparently it's a "combination" issue.

This is with FireFox 1.0 on Windows. Ditto with an old copy of Opera7.

Thanks to all those who have contributed to the discussion. Comments are now closed, but you can contact the author of the post directly.