TwitThis Causes Pages To Load Slowly – Here is a fix

Have you noticed my pages loading extremely slowly over the last few days? I am not talking about my sidebars, which appear after my content, but my articles which always load first, and usually quite fast.

The culprit is TwitThis, that seems to be using Amazon S3 to store images.

Here is the standard TwitThis code:-

<!-- Begin TwitThis (http://twitthis.com/) -->
<script type="text/javascript" src="http://s3.chuug.com/chuug.twitthis.scripts/twitthis.js"></script>
<script type="text/javascript">
<!--
document.write('<a href="javascript:;" onclick="TwitThis.pop();"><img src="http://s3.chuug.com/chuug.twitthis.resources/twitthis_grey_72x22.gif" alt="TwitThis" style="border:none;" /></a>');
//-->
</script>
<!-- /End -->

What you need to do is host the TwitThis logo on your own server to speed things up.
Here is the image used that you can save to your harddisk and then upload to Wordpress or other blogging platform.

twitthis_grey_72×22.gif

Then all you need to do is insert it into the code

In my case this is what I am using

<!-- Begin TwitThis (http://twitthis.com/) -->
<script type="text/javascript" src="http://s3.chuug.com/chuug.twitthis.scripts/twitthis.js"></script>
<script type="text/javascript">
<!--
document.write('<a href="javascript:;" onclick="TwitThis.pop();"><img src="http://ndybeard.eu/wp-content/uploads/twitthis_grey_72x22.gif" alt="TwitThis" style="border:none;" /></a>');
//-->
</script>
<!-- /End -->

Actually I have listed a broken URL above, I don’t want people just copying the code and trying to use the image from my server.

As an alternative to the TwitThis button, Jemmille has created a modified version of my hacked Sociable plugin Antisocial that includes a “TwitThis” button, and a fix to StumbleUpon.
I will probably update my distribution with Jemmille’s code in a few days, but you can get it directly for now.

Update: This wasn’t a total fix because the Javascript was still being loaded from Amazon S3 and was causing horrendous page load times. TwitThis has been removed until I can hack a version that doesn’t use javascript.

Related posts

This entry was posted in plugins, web 2.0, wordpress and tagged , , , , , , , , , . Bookmark the permalink. Both comments and trackbacks are currently closed.

One Comment

  1. lucia (54 comments.)
    Posted August 23, 2007 at 9:19 pm | Permalink

    I stripped the little twitter widget from my sidebar. It’s too slow. I also dumped sphere which I was trying out.

    When your hit count on your server are much larger than the number logged by sitemeter in the footer and you can sip a glass of wine as your page l_o_a_d_s, you know there is a problem.

  • RAP Bank

    I have just signed up for RAP Bank myself - call this a mini-review.
    It seems to be one of the smartest ideas for a long time as a great way to consolidate 100s of affiliate programs under a single entity for promotion.

    It is also one of the best implementations of WordPress I have ever seen.
    It is not without its bugs, as this is effectively pre-launch. For example I just found a bug in the keyword based search RSS feeds (yes RSS feeds for any term will be hot), but it looks like they might be onto a winner.
    Check it out - signup for the basic service is free.

    >Affiliate Program

    P.S. It is not immediately obvious who is running the site, but looking at my Paypal receipt (yes I signed up for Vendor Plus) I believe the site is run by Bill Ortell From Rap-Extras.com who is RAP certified and does the membership add-on that is highly popular.