[thelist] Recieved number of bytes

Drew Shiel ashiel at sportsinteraction.com
Tue Jun 22 07:47:38 CDT 2004


At 13:34 22/06/2004, Andreas Wahlin wrote:

>I work in ASP, so sort of Request.TotalBytes which gives the number of
>bytes from the client to the server, but the other way around :)
>I'll only use it for test purpouses so it needn't be nice, it could be
>some external software, asp function, browser data or anything.

   I'd be inclined to use wget or the like, and check the filesize? 
Alternately, I've a bookmarklet here to check page weight - no idea where I 
got it, though.

   (Watch that line wrap!)

   javascript:var fs=0;var f=1;var 
p='';for(i=0;i<document.images.length;i++){if(p.indexOf('('+document.images(i).src+')')<0)fs=fs+parseInt(document.images(i).fileSize);p=p+'('+document.images(i).src+')';};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, 
i)+','+fs.substring(i,fs.length);}f++;}alert('This page weighs '+fs+' bytes.');

   That do the trick?

   Drew.
-------------- next part --------------

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.708 / Virus Database: 464 - Release Date: 18/06/2004


More information about the thelist mailing list