tags:

views:

33

answers:

1

I've been playin with Google's Page Speed, and it gave me some tips to improve the loading speed of my site:

http://alexchen.zxq.net/ (original hosting)

http://alexchen.co.nr (URL redirection)

I minified some Javascript files (I didn't compress them), and optimized some images, but it still kind of slow. I'm not very sure if I'm overloading something or its because i'm using a shared free hosting (I know, I have to get a .net or .com, but I'm having problems with my credit card right now).

Any suggestions?

+3  A: 

In total your homepage loads 2.6mb, 2.4mb of images alone even though you only have a few directly visible. You should defer loading your showcase images like http://alexchen.zxq.net/images/showcase1.png until the thumbnails are clicked. This image is 0.5mb and gets loaded on every homepage visit whether someone visits it or not. See a lightbox javascript lib such as facebox which loads up the image on demand using AJAX.

Think about moving the position of the JavaScript to the bottom. As scripts block parallel downloading you should load these last to allow other elements like images to download. I profiled your site and the jquery seems to take a while to download, blocking other files from starting.

Turn on caching for static elements aswell in order to cut down server requests on second visit.

Install YSlow to get more details.

Duncan
@Duncan I not very familiar with ajax. Does facebox uses an ajax call by default? For instance, if I call a div like this: "<a href="#info" rel="facebox">text</a>" Does it uses ajax or I have to call an html file? (<a href="info.html" rel="facebox">text</a>).
janoChen
@janoChen you can load an image as <a href="/images/myimage.png" rel="facebox">Click here</a> This will load myimage.png in a lightbox. I couldn't get access to your site to see specifics, sorry.
Duncan
Also run your images through http://developer.yahoo.com/yslow/smushit/ to get great image compression. I forgot to mention this. On your homepage you would be trimming off ~75kb by optimizing further without sacrifising quality
Duncan
@Duncan I'm loading the images from external php files using ajax and fancybox. Something like this: <a id="showcase1" href="showcase/showcase1.php"><img src="images/showcase1t.png"/></a>is it the same result you were talking about?
janoChen
@Duncan I think it worked, the page loads a lot faster: http://alexchen.co.nr/, thanks!
janoChen