Link to home
Create AccountLog in
Avatar of willa666
willa666Flag for United States of America

asked on

site loading in chucks

Hi All

So i have a site that when the pages are loaded the left nav loads slowly, like ts being streamed out and its getting stuck.

I am wondering if anyone else has these problems when you view the site and have any advice?

http://urlant.com/yvwjp1

Ww
Avatar of Becky
Becky
Flag of United States of America image

It's loading very quickly for me, but I do see that the header loads first, then the left nav, then the body.  Keep in mind that an HTML page will load in order.  So first the HTML page, then the browser performs a GET on the first item it sees (be it a CSS file, JS file, image, etc..) then subsequent GET requests for each new element.

If you have a lot of javascript on the page you could try loading that last by putting it at the end of your HTML page.   Just make sure that, if you have any JS executing on page load, that it does get loaded in the head.  All other JS can go at the bottom of the page.
Also make sure your images are all 72 dpi and made to be as small as they can be.  If you're using JPEG files make sure their quality is "just enough" so that they look good in a browser.  Try not to include too many files on your web page at a given time.   Little things like that...
Avatar of willa666

ASKER

Hi greensunie

I was having a poke into the rendered source code and foud that 90% of he charters are for the left nav, that 16000 out of 17000. most of them are bank space. so i might see if we can parse these wastes of space :)

Also I had a thought about having the Left nav after the body in the page source so it would load ate rthe main body. cos it is all controlled by css it sould be noviel to do this.

Ww
Good idea to have the left nav load after the body.  Easy to float it that way in CSS.  What do you mean by "charters"?  Anything you can do to reduce the file sizes of your images, reduce the number of CSS files (and size of CSS files) as well as JS files (perhaps run the JS files through an optimizer as well) will help.
So it turns out that the file Is 256k just for the source code of the HTML page. I did some regex on the page and after rem'ing the white space go it down to 50k ;)

Is there a mod to remove white space in files servered via apache.

Ww
ASKER CERTIFIED SOLUTION
Avatar of Becky
Becky
Flag of United States of America image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer