views:

61

answers:

5

I have been developing web applications for a few years now. One of the issues that I face is having to develop web apps where javascript is not enabled or not available. I know this was a issue a few year back but am curious to know what other web designers, developers think about this issue? Is that still an issue?

The reason I am asking this is because it seems to me we are just catering for scenarios that is very unlikely to happen now a days. This is especially with regards to public facing websites and web applications? Am I right in my assessment? I am keen to know the experiences and any learnings of other web developers and designers

Thanks.

+2  A: 

I would recommend you try to ensure the basic functionality of your site is available without javascript.

If you work this way, you'll end up with a site that works even if you, or another dev, allows imperfect JS into the production site - a serious JS error won't necessarily be a total show-stopper.

Also: AJAX, effects and other fluff can take aaaaaaages to debug. Users don't mind simple. You should aim for simple, and slowly add bells and whistles, user testing as you add, to avoid creating an AJAXeffectsFluffy crap heap that is confusing and buggy...

Michael Robinson
+2  A: 

Even today, some people (including myself) have JS turned off by default. Professionally built sites either warn about disabled features or work without JS (via full page reloads).

alxx
+1  A: 

Progressive enhancement! I nearly always browse with JS disabled after spending way too long being annoyed by over AJAXd websites, so always start from simple page load forms etc before adding JS functionality.

JS frameworks like jQuery, mootools etc are getting more and more popular as pretty much anyone can produce a "shiny" website with animations. But I think that the more people start to use the tools, the less willing any regular browser will be to enable JS.

MRW
+1  A: 

+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.

Sunday Ironfoot
A: 

There are some who think you need to also take care of people who have CSS turned off. All this can drive you crazy, accounting for all the "what ifs" of the web world. Those who turn off javascript know what they are in for and are never surprised to find a site that doesn't work because of it. If they know enough to turn it off then they know enough to turn it back on when they need it.

I think it was Tim Berners-Lee who once said the web was always meant to be scriptable. Scripting hooks are built into HTML and all browsers work with it. Almost everyone has it turned on and they should. Use it to your advantage.

Rob