开发者

What percent of web sites use JavaScript?

开发者 https://www.devze.com 2022-12-30 12:06 出处:网络
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.

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开发者_Python百科 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?


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.


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.


"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.


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


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.


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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号