Sign in or Join FriendFeed
FriendFeed is the easiest way to share online. Learn more »
Clare Dibble
You should know that those dozen+ javascript and css files make the page take forever to load. - Gabe
@Gabe, what do you mean by "forever", and how do you know that it is the javascript and css files? It seems to me like most sites have several javascript and css files (especially blogs with lots of plugins). I do have several alternate stylesheets. Maybe it is time to get rid of those. It seems that most people don't even seem to notice them. I thought it was kind of a neat idea though. - Robert Felty
About a half-minute. The browser can't display the page until it has the stylesheet, and it can't even finish loading the page until it has the javascript (because it has to be executed inline). Generally a page will display as it loads if it doesn't need those external items. There's close to 250ms latency between my hotel room and your server and there are 22 files to load, so it could easily be 11 seconds to load the page if there are no dropped packets. Of course since packets do get dropped, everything takes exponentially longer (unless it times-out). - Gabe
@Gabe. What browser? I usually don't experience much lag (even at home on our crappy satellite internet), but I think that living with satellite internet has made me patient. I just tweaked the javascript and style stuff for my other blog, which uses a very similar, though not identical style. How is the page load time there for you? http://blog.robfelty.com - Robert Felty
I'm using IE6, but I think most major browsers use the same algorithm. That robfelty page displayed after about 8 seconds, but it took a while after that for all the images to load. Keep in mind that my connection appears to be unusually lossy, but the Internet in general is inherently lossy. - Gabe
@Gabe - that is still a bit slow. I use several plugins which load some javascript files, some of which I have written myself. I am actually in the process of re-writing some of those to share more code, to reduce the number of files they load. Any other suggestions for speeding up page load time (without decreased functionality)? - Robert Felty
Cut out things you don't need, and combine files where possible. For example, you have 8 javascript files that could probably be combined into 1. If you still want to maintain the files separately, you could use PHP to just include them sequentially. I bet you could do the same with stylesheets, too. If the files are small (maybe 1-2k), just server-side include them because the overhead of downloading them for each page is about the same as just checking to see if the cache is up-to-date. - Gabe
@Gabe - I cut out a bunch, but for some reason I can't figure out how to only choose the parts of scriptaculous that I am using from within wordpress. So there are about 8 js files all being asked for when I all I wanted was one stupid little animation. I think it should load significantly faster though now. Please give it a try if you have a chance. Thanks for pointing it out, and for the advice. - Robert Felty
Wow! It loaded in only 5 seconds now. - Gabe
@Gabe. That still seems a bit slow, but I guess I can live with that for now. Thanks again for pointing it out. Today should I actually try to get some work done. - Robert Felty