Create Account

Remember me

Make Pages Load Faster (Web Dev)

2 comments, 5139 views, posted 9:50 am 10/09/2008 in Geek by marksyzm
marksyzm has 17824 posts, 2298 threads, 2 points, location: Oxford, United Kingdom
Computer user, non-technical

About six months ago I noticed the pages generated by the content management system were in itself very clean and small, but that these pages still took a long time to load for new visitors. Even on a fast internet connection it took more than 8 seconds to load a basically empty page. The server generated the page in about 350ms, so that wasn't the problem. The problem turned out to be a combination of two things: each page used more than 12 different css files because each plugin supplied its own css definitions and because the use of the rather large prototype and scriptaculous javascript libraries which also consists of a couple of different files. Now that an article about the same problem featured on the Yahoo! User Interface blog, I decided to make my solution public, so others can benefit from it.

The solution turned out the be simple, combine all the different files into a single large file and compress that file using gzip. Unfortunately, if you do this manually you are going to run into maintenance problems. That single compressed file is no longer editable. So after editing one of the original source files you will have to recombine it with the other files and re-compress it.

The answer is here....


1:09 pm 10/09/2008


isnt gzip functionality built into apache?

11:29 pm 12/09/2008


yeah but it doesn't mean it uses it everytime you load a file. You have to trigger it yourself. You still have to run it with external scripts too like your JS and CSS

Add Comment

via teoti, or register to add a comment!