views:

149

answers:

4

Possible Duplicate:
Is it worth it to code different functionality for users with javascript disabled?

I've just learned in this question that an ASP.NET webforms application will have issues to run properly in a browser with disabled Javascript (unless I don't use certain controls and features).

So this is a kind of a follow-up question. For my current web application which will only have a small number of users I can postulate to enable Javascript.

But how to deal with this question in general? As I can see (with my rather small knowledge about web development until now) Javascript is all around, especially the more a web site is "dynamic" or "RIA" like.

  • Is it worth at all to take care about the few users during web app development who disable Javascript in their browsers?

  • Are they really "few"? (I actually have no clue, I just don't know anyone who has Javascript disabled.)

  • I'm a bit inclined to tell them: "If you want a nice interactive page, don't disable Javascript." or "You cannot enter this website without Javascript. Go away!" Because I don't want to double code and development time for some mavericks (if they are mavericks). Does it indeed add a lot more time to get a website working with Javascript and without Javascript as well?

  • For what reason does someone disable Javascript at all in his/her browser? Well, I've heard: "Security!" How unsecure is Javascript actually? And does that mean in the end that millions of pages are unsecure and almost every website I am using is a risk for me? Are there other reasons except security?

  • Are there any branches or environments where it is usual or even mandatory to disable Javascript for security (or other) reasons? (For instance I have security services, offices in defense ministries or a bank in mind.)

  • Are there any trends in development to see to add more Javascript to web sites, thus making it more and more necessary to let Javascript enabled in the browser? Or is there rather a counter motion?

Thank you for some feedback in advance!

+1  A: 

My personal view is the number of people who completely disable javascript to the extent that .net web sites stop functioning is very small - For some government sites I have been responsible for, I don't recall getting any complaints from "non-javascript" users.

My concern would be more about making sure your site was xhtml compliant, with valid markup (which earlier versions of Visual Studio did not generate), valid css, and intelligent use of javascript.

Having a disclaimer somewhere on your site - that is accessible to those few with javascript disabled telling people that javascript is required for the site to function correctly would be a good thing.

Ken Ray
I am using VS2008 SP1. Hopefully the generated code is XHTML compliant enough, isn't it?
Slauma
I wouldn't take that for granted if you are using WebForms. A lot of the markup that is generated is questionable, at best.
Keith Rousseau
I think VS2008 / .Net 3.5 is pretty good at generating XHTML compliant markup. VS2003 would completely hose compliant markup though.
Ken Ray
+2  A: 

Whether or not to care about users who turn off javascript should be done on a case by case basis. If you believe that it is ok to turn away users that do not have it enabled then that is a decision that you can make and is made by many apps.

Keep in mind that it is not necessarily a conscious decision to have javascript disabled or at a limited capacity. Screen readers, for example have a very stripped version of javascript and a site that uses it throughout will often be inaccessible. Depending on the website, this may actually be illegal.

If a website is properly constructed with progressive enhancement from the beginning, then creating versions that work without javascript should not be too much additional work. Therein lies one of the major issues with webforms - it is difficult to gain control over markup and javascript tends to be very tightly coupled.

Keith Rousseau
Thanks, important point that there can also be technical reasons, like the screenreaders which do not support all Javascript functionalities! A fact I didn't have in mind!
Slauma
+1  A: 

Depends on your audience. For one thing, if the site is completely nonfunctional without JavaScript, accessibility (e.g. to those who must use a screen reader) may be an issue, so if you expect any blind users, you might need to consider that.

In most situations, I'd say, you're probably fine just using <noscript> tags to drop in a quick disclaimer along the lines of "JavaScript is required to use this web site."

DanM
+2  A: 

While I have no solid numbers -- and I presume I'm in the distinct minority -- I, and many of the more savvy users I know, disable JavaScript by default (a la NoScript). I enable it on websites on a case by case basis. Most novice users (I'm ignoring the 25% in the upper/middle of experience) don't even know what "JavaScript" means.

As a developer I see the cost/benefit of supporting JS-less users as boiling down to one question:

    Do your users need the site more, or do you need your users more?

One of my current projects makes heavy use of JavaScript and Flash and does not function at all without it. But as it's installed at the employer's site and the visitors are the employees using it for their job, that requirement is completely reasonable.

However, if I were working on a revenue-generating site where losing users meant losing money, I'd seriously think about crafting the site to work w/o JS -- albeit less quickly with more page reloads. (Perhaps by asking advice here.)

As a random thought -- you could probably devise a special method to determine how many of your current users do and don't have JS enabled.

NVRAM
May I ask you why you have Javascript disabled by default? Due to security concerns, or are there other reasons?
Slauma