FeedBurner Lagging My Site! Can’t Fix Until FeedBurner Gets Smart!

Well, today I noticed that each article takes about 10 seconds longer to load because of a little stat-tracking widget I installed from FeedBurner. If this happens a second time, or if this continues for longer than an hour, I’m removing it. I already track my stats through Analytics anyway.

Which, by the way, is an awesome way to track your stats. I’m only using FeedBurner’s because it’s convenient. But if it’s going to jack up my site, screw that!

In my opinion, a JavaScript tracker should be designed so that it doesn’t screw up load times! Why isn’t it load balanced? Why is FeedBurner.com loading just fine? Why can’t they give you an “advanced” piece of code to paste that uses conditional JavaScript loading. From the article:

You may sometimes find yourself with big JavaScript libraries to include in your documents. … add them dynamically via the DOM … This … would … load the file … when DOM is available in the browser, older browsers would not load the file.

In other words, load the JavaScript after the rest of the page has loaded rather than causing the entire site to lag! Like I said, this should be an “advanced” snippet people should be allowed to do.

Thus, the current snippet:

<script src=”http://feeds.FeedBurner.com/~s/MichiKnows?i=<?php the_permalink() ?>” type=”text/javascript” charset=”utf-8″></script>

Becomes:

<script type=”text/javascript” charset=”utf-8″>
window.onload=function(){
    if(!document.getElementById || !document.createElement){return;}
    var newjs=document.createElement(‘script’);
    newjs.type=’text/javascript’;
    newjs.src=’http://feeds.feedburner.com/~s/MichiKnows?i=<?php the_permalink() ?>’;
    document.getElementsByTagName(‘head’)[0].appendChild(newjs);
}
</script>

Of course, this won’t work on FeedBurner for two reasons:

  1. If they are using onload functions, those won’t fire.
  2. FeedBurner uses document.write, which must be called before the document finishes rendering (during load). 

They use 100% inline Javascript!

Unfortunately, because they are written as in-line scripts which use document.write() statements, there is no easy way to defer their output after onload has fired or request them interactively in a way that won’t be likely to wipe out and completely rewrite the current document (unless you load them into individual <iframe> documents, which is the only guaranteed, though awkward, workaround I can think of at the moment).

So while my solution almost works, it doesn’t matter since they use a bad solution which breaks most workarounds!

When they fix their stupid script or if you know of a workaround, let me know!

Sheesh.

2 thoughts on “FeedBurner Lagging My Site! Can’t Fix Until FeedBurner Gets Smart!”

  1. Hi, Jeff from FeedBurner. I just wanted to check in to see if you were still seeing slow page loads on your site? I’ve been poking around a little to see if I can spot any problems.

    Our flare & site tracking is indeed load balanced and definitely should not be slowing you down. We’re actually quite paranoid about this because, as you mention, a service like that is a real bummer if it slows down your site!

    You also bring up some good points on the loading of our javascript. We don’t wait for the onload on purpose — otherwise we might not be notified of a page view or click under various circumstances.

    And we’re always looking at different ways to incorporate our script to see if there’s improvements we can make. So thanks for the feeback, and please let me know if you see any more problems!

Comments are closed.