Jump to content
xisto Community
Sign in to follow this  
jlhaslip

Checking Size Of Web Pages and download weights

Recommended Posts

Do you have a method for measuring the 'size' of your web site to determine how fast or slow the site will load on various connections? Does it consider the values for the image and css files which have to follow along? And what sizes are considered acceptable?Thank you.

Share this post


Link to post
Share on other sites

i kow there are websites that test website speed go to this website and try out websites to see the results it shold help. I believe dreamweaver has that built into the software as well.

http://www.vertain.com/?sst

Share this post


Link to post
Share on other sites

Thanks.That Web Developer does a whole bunch of stuff. Thanks again for that tip. I'll be sure to check there first before posting questions here...

Share this post


Link to post
Share on other sites

Dont worry too much, most people is glad to help out wherever we can :huh: I have a php script which lets you do the trick, let me find it...

<?php# http://http://www.lawebdelprogramador.com//* Take local time, it has to be at the beggining of pageCoge la hora actual. Tiene que estar al principio de la pagina*/$InicioCarga=date("H-i-s");/* Our page begins here...Aqui empieza nuestra pagina******************************************************************************our page ends here aqui finaliza nuestra pagina *//* take local time. This has to be at the end of the documentCoge la hora actual. Tiene que estar al final de la pagina */$FinCarga=date("H-i-s");/* function " SegundosDiferencia, returns number of secons betweentwo different time (in time format)la funcion SegundosDiferencia devuelve el numero de segundos entre dos horas. */$resultado=SegundosDiferencia($InicioCarga,$FinCarga);/* show resultsMostramos los resultados. */echo "Ha tardado ".$resultado." segundos en cargar la pagina.";/* echo "Yer lovely page has delayed".$resultado."seconds loading this page. There you go buddy."; */function SegundosDiferencia($horaini,$horafin){$horai=substr($horaini,0,2);$mini=substr($horaini,3,2);$segi=substr($horaini,6,2);$horaf=substr($horafin,0,2);$minf=substr($horafin,3,2);$segf=substr($horafin,6,2);$ini=((($horai*60)*60)+($mini*60)+$segi);$fin=((($horaf*60)*60)+($minf*60)+$segf);$dif=$fin-$ini;return $dif;}?>

Hope this worx

-10730

Share this post


Link to post
Share on other sites

You can't really get the exact size of a web page, especially if it contains dynamic content - everybody uses their own style of markup, and it makes it difficult to extract and calculate the sizes of images etc. Apache (and most HTTP v1.1 servers) support the 'HEAD' method, which returns just the header for the requested file and not the actual file contents. This makes it easy to get the size of binary files, but it cannot be used with text/html files - ie. web pages.

Share this post


Link to post
Share on other sites

Apache (and most HTTP v1.1 servers) support the 'HEAD' method, which returns just the header for the requested file and not the actual file contents.

192003[/snapback]

How do you do this method? Could you give further details please?:huh: Thanks for this tip!

Share this post


Link to post
Share on other sites

My method?In your browser, save the webpage. You should get a file foo.htm, and foo.htm_files (or something similar). Measure the size of the folder and add it to the size of the HTML file, and you have a Kb size for your page.Typical 56k dialup gets you speeds of around 5kb/s - 28k half that. Divide your page size by five for a seconds-time for 56k dialup users - note that you're assuming they're not doing anything else. On broadband - if if takes your page more than a few seconds to load over broadband, you need to go back to the drawing board and strip out all that kludgy markup and those prettyfying images.

Share this post


Link to post
Share on other sites

Guys, You must note onething.If you use the right tags and make best use of HTML, you can decrease the loadtime of your pages considerably.For example, Suppose you write an image tag <img src="somefile>The above tag will work perfectly. However, when your html page loads, it won't show up on your users screen since the browser has no idea about the attributes of the images.On the other hand, if you specify the WIDTH and HEIGHT attributes, after the html page loads, the browser will quickly allocate that much space on the screen and render the rest of the html. Also, most of you guys might have used advertisements on your site. Sometimes, when the advertising server is under load, your pages will not show up quickly, even thought the html has loaded completely. In such cases, it is best to put the ad-Codes in IFRAMES. This allows to load the ADs irrespective of the time taken by the advertising server to deliver the AD.Completing the HTML and keeping it as clean as possible is one good way to speed up the pages. Reducing the no. of images won't help is they are not setup properly in html. So, your friend might have a heavy graphic site, but his site would load quicker than yours, If he has used the right tags with right attributes.

Share this post


Link to post
Share on other sites

If you use the right tags and make best use of HTML, you can decrease the loadtime of your pages considerably.

That's all very well, but people still need speed test tools so they can know how any changes they are making are affecting download times.

Share this post


Link to post
Share on other sites

I use Dreamweaver, so whenever I need to know how large the file is and how long it will take to download over various connections, Dreamweaver will tell me. I think that Photoshop has a similar feature...but I'm not as sure about that.Good luck and good coding!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.