views:

251

answers:

6

I'm wondering just how pervasive JavaScript is. This article states that 73% of websites they tested rely on JavaScript for important functionality, but it seems to me that the number must be larger. Have any surveys been done on this topic?

Maybe a better way to phrase this question is - are there any sites that don't use JavaScript?

EDIT: By 'use', I don't necessarily mean "rely on for important functionality" - that was just the statistic that one article gave.

EDIT: I wrote a script to check out the top 500 most visited sites according to alexa.com and see if they contain a <script> tag. Out of the 483 sites that actually loaded, only 2 of them did not on their front page: craigslist.org and wikimedia.org. However, any pages past their front page did use JavaScript. Is this a representative sample?

+2  A: 

Mine doesn't require it, and all "good" sites degrade gracefully in the absence of JavaScript. In addition, there are plenty of mobile sites that are specifically designed to run on devices devoid of JavaScript.

StackOverflow.com, for example, does not necessarily require JavaScript, but does require it for voting and commenting.

However, I would venture a guess that quite a few more sites simply "use" javascript, rather than "rely on it" for major functionality.

John Gietzen
I'm pretty sure answering, commenting and voting on stackoverflow falls under important functionality.
MatsT
i'd say SO definitely relies on JavaScript, man.. this site wouldn't be what it is without the addicting nature of rep
Claudiu
"Good" here is subjective. Sites that require JavaScript for major functionality are well within reason to require that a user have JavaScript enabled, and doing so doesn't necessarily make them not "good."
Justin Johnson
@Claudiu -- SO functionality comes in two flavors: reading and using. From a search-engine visitor perspective--and I believe this is what *most* visits are--no javascript is necessary to read the content or click on links to find/read more content. Basic functionality--all done. For contributors and askers, more is necessary, but owing to the assumptions they thought they could make about those kind of users, they don't have to have non-js fallbacks, which responsible web developers generally must include.
D_N
@MatsT: Except that it isn't required for answering, only commenting.
John Gietzen
+1  A: 

Usability Expert Jakob Neilsen doesn't use JavaScript on his site...

Justin Ethier
His site looks like if 1980 was a printer. Ha!
bschaeffer
Of course he won't, he's a retrograde.
Ben
Color Blind Usability Expert Jakob Neilsen...
Gabriel
truth be told, his website loads incredibly quickly
Claudiu
+2  A: 

There are only 100 web sites that are in the list of top 100 websites, and they count for only a measly percentage of all websites. A fabulous percentage of websites are rarely visited. Because they have few users, the receive little testing and even less complaint from users that need it to work without javascript, or with a version different from what the developer happened to use.

Maybe the worst part of it is these sites make use of all sorts of showy bling in the form of Javascript and flash to look interesting or important.

Core functionality in these cases is really just basic site navigation.

TokenMacGuy
I <3 your name so much I just used <3.
D_N
+2  A: 

"are there any sites that don't use JavaScript?"

The answer would be - definitely yes. Thousands of students who are learning HTML do tons of websites and put them in the Net without any Java Script. I know that for fact because I saw that happening.

Anvar
A: 

I would say that either way, with the introduction and development of html5 websites are going to rely less on javascript to accomplish what they need.

And IMHO, having a more compatible web with less dependencies is always a good thing :D

Immanu'el Smith
+1  A: 

No, that is not a representative sample. You want to know what percentage of (all) websites use JavaScript, not what percentage of the top 500 use JavaScript, so your sample should be a random sample of all websites, not a sample of the top websites.

Also, what kind of HTTP headers did your script send? Did it mimic a class of browser such as Internet Explorer? A server-side script might send back different content depending on the user-agent string.

Either way, write your site so that the user can still read it and use it without CSS and JavaScript, but feel free to use those tools to make it look and behave better.

el chief