Over a million developers have joined DZone.

JavaScript -off Unfriendly, And Proud About It

· Web Dev Zone

Start coding today to experience the powerful engine that drives data application’s development, brought to you in partnership with Qlik.

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.

Create data driven applications in Qlik’s free and easy to use coding environment, brought to you in partnership with Qlik.


Published at DZone with permission of Bozhidar Bozhanov, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}