Friday, February 23, 2007

Tommy Olsson: Graceful Degradation & Progressive Enhancement

Itt van a teljes cikk, de lenyeg:

The premise for graceful degradation is to first build for the latest and greatest, then add handlers for less capable devices.

Another common occurrence in sites built from the graceful degradation point of view is the noscript element. You provide some feature based on JavaScript and add a more basic version for user agents that do not support JavaScript or have client-side scripting disabled.

There is one problem with noscript, though. I may use a browser that supports JavaScript and has it enabled, but there could be a company firewall that strips incoming JavaScript for security reasons. In this case the noscript element will not be rendered (because my browser supports scripting) but the JavaScript code that should create the menu won’t be applied either, because it gets stuck behind the firewall.

Progressive enhancement starts at the opposite end from graceful degradation: begin with the basic version, then add enhancements for those who can handle them.

The most common occurrence of progressive enhancement is probably the external CSS style sheet.

This is progressive enhancement: it works for everyone, but users with modern browsers will see a more usable version.