+1 for Progressive Enhancement. This is where you have basic, non-flashy, functionality with straight-forward HTML/CSS then get JavaScript code to either supplement or replace that functionality with it's own.
For instance, if you have paging navigation on the page that consists of simple hyperlinks for page 1, page 2 etc eg.
<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'd have JavaScript functionality that looks for your div.paging
element and completely replaces it with something more elegant, eg (in pseudo code)
$('div.paging').each(function()
{
$(this).find('ul').remove();
$(this).append(renderAdvancedPaging());
});
As for what it could be replaced by, it could be Google Images style infinite scroll (yes I know Bing had it first), or Twitter's approach of having a big next page button at the bottom that dynamically appends the next set of results (have a look http://twitter.com/codinghorror - scroll down and click 'More').
The benefits of this 'Progressive Enhancement' approach are:
- Works for people who have disabled JavaScript, this includes savvy users, and users working in heavily locked down corporate intranets.
- Accessibility: blind users with screen readers can still use your site.
- Search engines, which won't execute any JavaScript on your page, can still follow your paging links and index additional content of those pages.
The last point should be the most important if you care about SEO.
There are times, however, when you can reasonably ignore Progressive Enhancement and build a website which relies on JavaScript and won't work without it. You'd typically do this for advanced 'Web Applications' or mobile optimised web-apps for instance, think Google Maps, a calendar app, a HTML5 drawing app that uses the <canvas>
element, an HTML5 powered game etc. My rule, anything 'Content Based' (blogging site, news site, e-commerce shop etc.) should apply Progressive Enhancement, whereas anything 'Application-y' could just get away with mandating JavaScript.
Ultimately, it comes down to what you're building and whether the Progressive Enhancement route is right for you.
Stats for number of people with JavaScript disabled is hard to come by (some here but it's from 2008, also this StackOverflow post from 2008), but I think it's becoming increasingly less likely to have script disabled because of the increasing number of RIA apps and HTML5 apps that rely on JavaScript (Google Docs, Maps etc.). Also take into account the increasing number of Mobile Internet Devices (iPhones, iPads etc.) that don't allow you to disable JavaScript.