[thelist] How to find out the size of a web page?

aardvark roselli at earthlink.net
Fri Nov 8 10:00:01 CST 2002


> From: Moe Rubenzahl <moe at forpaws.org>
>
> Related to the question of how to find the size of a site is an
> easier question: How to find the size of a page, including all
> graphics, easily? I used to use websitegarage for that but it's gone.
> I can grab the HTML and all the graphics, then add it up but was
> hoping for an easier way.

familiar with bookmarklets?  dunno where i found this one, but i use
it regularly to do quick checks (since IE6 doesn't support the web
developer image weight tool that MS released for IE5):

javascript:var%20fs=0;var%20f=1;var%20p='';for(i=0;i<document.ima
ges.length;i++){if(p.indexOf('('+document.images(i).src+')')<0)fs=fs+
parseInt(document.images(i).fileSize);p=p+'('+document.images(i).s
rc+')';};fs=fs+parseInt(document.fileSize);fs=fs+'';for(i=fs.length-
1;i>0;i--
){if(f/3==Math.ceil(f/3)){fs=fs.substring(0,%20i)+','+fs.substring(i,fs.le
ngth);}f++;}alert('This%20page%20weighs%20'+fs+'%20bytes.');

obviously you wanna paste that to one line...

you can find other keen tricks at (which will help explain what the
above code is for those who don't know):
	http://bookmarklets.com/


--
Read the evolt.org case study
Usability: The Site Speaks for Itself
http://amazon.com/exec/obidos/ASIN/1904151035/evoltorg02-20
ISBN: 1904151035



More information about the thelist mailing list