Re: Javascript on the Web

Ian Hickson wrote:
> According to this December 2005 study of a billion or so documents:
> 
>    http://code.google.com/webstats/2005-12/scripting.html
> 
> ...roughly half of pages had <script> tags (I just checked the raw data 
> and it was about 65% of pages).
> 
> A study that I did in September 2006 covering a larger set of documents (a 
> few billion) found about 75% of documents had <script> elements. In that 
> study, the average page had 5 or 6 <script> elements. About 34% of 
> <script> elements had src="" attributes. About 70% of pages had <script> 
> elements without src="" attributes.
> 
> [...]
> 
> Philip` might be able to corroborate these numbers.

I encountered somewhat similar numbers, though it's strongly dependent 
on what web pages you look at:

 From a random sample of dmoz.org's list of pages, three months ago [1]:
* 67% had at least one <script>.
* Mean number of <script>s per page was 3.6.
* 39% of <script>s had src="...".
* Of the pages with at least one <script>, 68% had at least one <script 
src>.
(Some of this data is probably affected quite strongly by a few sites - 
e.g. weather.com appears in dmoz.org frequently, and has 135 <script>s 
on a typical page, which will raise the mean significantly.)

 From the Alexa Top 500 list of front pages, also about three months ago:
* 93% had at least one <script>.
* Mean number of <script>s per page was 13.
* 33% of <script>s had src="...".


[1] http://canvex.lazyilluminati.com/survey/2007-07-17/analyse.cgi/index

-- 
Philip Taylor
pjt47@cam.ac.uk

Received on Thursday, 18 October 2007 14:58:21 UTC