Sunday, January 1, 2012

Page Size, Includes, and Page Rendering

I came across a site that took a long-long-time to load. I took a look at its source code. The code is well-written; there are no graphics or movies and yet it takes about 20-40 seconds for the page to render.

There are at least 22 .css includes and 17 .js files. The file is 512K NOT including the .css and .js files and has 3859 lines.

OK designers and developers I know that many users have great connections but when you have almost 4000 lines of code (not counting .js and .css files) including one line - jQuery.extend(Drupal.settings)- which had over 57,500 characters you've gone off the deep end.

Maybe in 6 years when computing power quadruples and we're all on Gbit networks then fine. Until then, at the very least, make certain that the file in question uses all the .js and .css files being called.

See other files that covered this topic:

1. Why am I waiting so long for some websites to download?
2. @Font-Face and Page Rendering Performance

No comments:

Post a Comment