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 Blogrolling.com. 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 Blogrolling.com 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 Blogrolling.com 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 Blogrolling.com code which loads quickly even if Blogrolling.com is down.

The key to keeping your site maximally available is to move the Blogrolling.com JavaScript code to the very end of your template. The idea is that everything in your template is executed before the Blogrolling.com code. This keeps your page load times fast and makes your content available without the dependency on Blogrolling.com availability. Your Blogrolling.com blogroll code is executed after your entire page (with the exception of the blogroll) is visible. If Blogrolling.com 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 Blogrolling.com JavaScript will be paused while the blogrolls are loaded (assuming there is a problem at Blogrolling.com), so you may need to tinker with the location of things like SiteMeter code.

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

Bring On The Lawyers
Weekend Caption Contest™

5 Comments

  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