Javascript-off Unfriendly, And Proud About It

Your site should work even with javascript turned off, they say. I strongly disagree. First, it is a lot of effort to make a function-heavy site work without javascript. You’ve build the thing to work with ajax, cool controls and lots of dialogs. And you should build an entirely new version for those 2 percent that don’t have javascript? The effort just isn’t worth it. Not even for facebook, youtube and twitter – neither of them works without javascript.

So, when I develop a web app that fails to work properly without javascript (like welshare), I’m very much aware of that, and it’s done on purpose – to save unnecessary effort, and not to provide a crappy version of the UI. Of course, completely ignoring the fact that javascript may be turned off would be too one-sided. So:

  • make the basic home page and the signup page be workable without javascript. Some users (like me) block scripts with AddOns, for the sake of security. If your homepage is blank when my javascript is off, I’d be hesitant to enable scripts for it. But if I see it’s a trustworthy service, I may go and actually signup. Of course, ajax validation is a must nowadays, but you should have server-side validation anyway, so make your signup form work.
  • display a message “This site requires JavaScript to function properly”. That’s what many sites (including youtube, stackoverflow, and my aforementioned welshare) do. It’s easily handled by the <noscript> tag.
  • content-heavy websites are generally less reliant on javascript. They may use it for paging or comments but it’s not their main functionality, it’s just an “extra”. Such minor features can be supported, it costs you close to nothing (you’d have your 2nd page available for SEO reasons anyway)

Apart from that, the vast majority of services that rely heavily on javascript (because they are more applications than sites) should not bother making a javascript-off version.

8 thoughts on “Javascript-off Unfriendly, And Proud About It”

  1. Hi Bozho,

    good post !
    I’ve come (a long way) to the same conclusion.
    The hints you point out are essential.
    I’m browsing with NoScript and tend to leave sites which are totally blank – and there a an astonishing big amount of those. But as soon as I see a message concerning the use of js it’s allright.
    In 2010 I build a small CMR webapp and put *a lot* effort into making it work with and without js. Looking back I’d say 40% extra work. To cut the long(er) story short – at the end of the day *nobody* showed any interest in the fact that it was working without javascript.
    Simpe put, it’s not worth the effort and even worse it’s kiliing a lot of possibilities and inspiration – because once you started with a none js version, you’ll want it to have the same abilities and then it’s possible that you think: ‘Hmm, that no feasible without js, so maybe I’ll leave it out’.

    Have a nice time coding and great success with welshare !


  2. Totally agree. And if they don’t have Flash Player, too bad too! Just redirect them to some pretty little iPhone happy fun page with lovely rounded corners and CSS3 animations. They won’t know the difference.

  3. It’s a “dilemma” that i used to have when i first met jQuery, to be able to provide rich user experience is a pricey, it’s not free, you have to sacrifice visitors who come from bad browsers *ie* and old browsers, people with JS turned off, and even some mobile devices, but mainly, i suggest just two things:
    1. motivate the user to switch the JS on, by providing an image inside the nojs tag, something like promoting your site with JS on, believe me, it will work.

    2. the important thing to do is, to make sure that search bots are aware of your JS content, i lay my content from my serverside language (php, ruby) and then let JS work with it, so instead of making an ajax request to load the aritcles, i load them then let javascript slideshow them or whatever.

    thanks for the article :).

  4. If your website doesn’t work without Javascript and no extra effort then you’re doing it wrong in the first place!

    The three stages of web development:

    1) Content – Generate and display your content using pure HTML.
    2) Display – Add CSS and images to make your content look better.
    3) Function – Once everything else is up and running THEN you add in the Javascript for those who use it. If you want AJAX form validation, you still need a form and some server code to validate the form, so at this point you are just adding methods of accessing that data.

    And Facebook DOES work with Javascript disabled (as I use it like that).

    Some websites provide functionality which cannot possibly be done without Javascript, but most take user input and display content – features that have been available since HTML 1. The Gawker websites and Disqus comments are examples of this done wrong. They both just display content – nothing advanced AT ALL, yet neither work ever!

  5. I have only started using Visual Studio a few weeks. I think the post and the links were inretesting, but a little too advanced for me. Is there a link you can post about tutorials for beginners? Thanks!

Leave a Reply

Your email address will not be published. Required fields are marked *