views:

230

answers:

3

Hello,

I'm learning jQuery and am about to write some pages using intensively that library. I just learned that some user disable JavaScript on their browser (I didn't even know that was possible and/or necessary).

Now, here's my question: What happens to my web application if a user disable JavaScript? For instance, I'd like to display some screens using AJAX and commands such as 'InsertBefore' to bring in live a DIV that will display the result.

So, if JavaScript is disabled, I wonder what going to happen to all this work that relies on JavaScript?

I'm kind of lost.

Thanks for helping

+1  A: 

I just learned that some user disable javascript on their browser

I do. The "NoScript" plugin for FireFox does the trick.

So, if Javascript is disabled, I wonder what going to happen to all this work that relies on Javascript?

It won't be functional.

A good practice suggests designing a site not to rely on JavaScript for major functionality. At least, accessing its content (in read-mode) should be possible. JavaScipt should only add interface enhancements like Ajax techniques etc. But the fallback version should always work.

I feel really sad when I see a site which is completely broken without JavaScript. Why can't people use CSS to put elements in proper places? Why do they try to align elements with JavaScript even if there is no dynamics involved?

The same goes for Flash sites. Once in a while a land upon a "web-design-agency" site which makes picky comments about me not allowing JavaScript. When I do I only see a basic primitive site with a few menus and that's it. What was the point of using Flash when the work is so primitive it can be done with raw HTML and CSS in an hour? For me it's a sign of unprofessional work.

Developer Art
I have 2 questions for you. (i) why would you you disable javascript? (ii) why sites such as Yahoo Mail uses heavily javascript? did they think about it?
Richard77
JavaScript can cary security risks in all browsers. Yahoo thought about it and I'm pretty sure there is a usable version of it working without JS outside.
neo
Wow, you use a *plugin* for such basic built-in functionality?
RegDwight
@RegDwight The plugin is doing more than just enable/disable javascript completly, it can do this on a per-page and even per script base.
neo
@Richard77: Because I don't want to see my browser window suddenly expanded or moved. Because I don't want to see nasty popups asking me to signup for newsletter. Because active content carries a security risk and I do not implicitly trust every site on the web.
Developer Art
+7  A: 

You may want to start by reading on Progressive Enhancement and Unobtrusive JavaScript.

I would also suggest to investigate how popular rich web applications like GMail, Google Maps and others, handle these situations.

Daniel Vassallo
+2  A: 

All what's done in JavaScript won't work. Some users disable it for security reasons, NoScript is an excellent example. You can try it yourself by removing the scripts from your page or installing the NoScript-plugin for Firefox.

As a rule of thumb:

  1. Make the website working with only semantic HTML
  2. add the CSS
  3. add the JS

But the website should be (almost) fully functional in stage 1.

neo