+1 for progressive improvement. Here you have the basic, non-flashy, functionality with direct HTML / CSS, and then get JavaScript code to either complement or replace this functionality with your own.
For example, if you have a swap page on a page that consists of simple hyperlinks for page 1, page 2, etc., for example.
<div class="paging"> <ul> <li><a href="?page=1">1</a> <li><a href="?page=2">2</a> <li><a href="?page=3">3</a> </ul> </div>
Then you will have a JavaScript function that looks for your div.paging element and completely replaces it with something more elegant, for example (in pseudocode)
$('div.paging').each(function() { $(this).find('ul').remove(); $(this).append(renderAdvancedPaging()); });
As for what it can be replaced with, it can be an endless scroll in the style of Google Maps (yes, I know that Bing had this in the first place), or a Twitter approach with a big button for the next page at the bottom, which dynamically adds the next set results (see http://twitter.com/codinghorror - scroll down and click "More").
The benefits of this Progressive Improvement approach are:
- Works for people who have disabled JavaScript, including experienced users and users working in highly blocked corporate intranets.
- Accessibility: Blind users with screen readers can still use your site.
- Search engines that won’t run JavaScript on your page can still follow your paging links and index additional content on those pages.
The last point should be the most important if you care about SEO.
However, there are times when you can reasonably ignore Progressive Enhancement and create a website that relies on JavaScript and won't work without it. For example, you usually do this for advanced web applications or optimized mobile web applications, such as Google Maps, a calendar application, an HTML5 drawing application that uses the <canvas> , a game running HTML5, etc. My rule is that something “Content Based” (a blog site, a news site, an e-commerce store, etc.) should apply Progressive Enhancement, while “Application-y” might just go away with a JavaScript mandate.
Ultimately, it comes down to what you are building and whether the Progressive Enhancement route is right for you.
Statistics for the number of people with JavaScript disabled is hard to find ( some are here , but it's from 2008, also this StackOverflow post from 2008), but I think it's less likely that the script is disabled due to the increase in the number of RIA applications and applications HTML5 that rely on JavaScript (Google Docs, Maps, etc.). Also consider the increasing number of mobile Internet devices (iPhones, iPads, etc.) that do not allow JavaScript to be disabled.