Fight Your Blogrolling Woes

I noticed the both Kate and James has posts up about moving or removing their blogrolls due to occasional slow downs at I dealt with this problem last week at Wizbang, so I thought I’d share my tips.

Using the PHP feed seems like a great idea in theory, but in practice the fact that the code executes prior to the rest of your template code means that if is unavailable your site will not load until the PHP code times out. This is what was happening here, and it is unacceptable.

Using the JavaScript code (the default choice) to load your blogroll eliminates the issues with the PHP version as the code executes from within your template wherever it is called. Using this knowledge it is possible to craft a template that uses the JavaScript code which loads quickly even if is down.

The key to keeping your site maximally available is to move the JavaScript code to the very end of your template. The idea is that everything in your template is executed before the code. This keeps your page load times fast and makes your content available without the dependency on availability. Your blogroll code is executed after your entire page (with the exception of the blogroll) is visible. If is unavailable the spots in your layout for the blogrolls will be empty, but your page will be usable.

Site layouts are radically different from site to site, so I can’t give you a blanket answer to where exactly in your template the code should go, but if you make sure it appears after the MTEntries block your posts will all be visible before the blogrolls attempt to load. Remember that any code after the JavaScript will be paused while the blogrolls are loaded (assuming there is a problem at, so you may need to tinker with the location of things like SiteMeter code.

By moving the blogrolls to the bottom of your templates you can keep your page load times fast and be protected against slow downs at

Bring On The Lawyers
Weekend Caption Contest™


  1. Laurence Simon November 15, 2003
  2. michele November 15, 2003
  3. James Joyner November 15, 2003
  4. Steve November 15, 2003
  5. The Bartender November 17, 2003