Load time improvements

May 7, 2008

in Code

Load time matters

Imagine waiting 18 seconds for a page to load (on a high-speed connection) — not just the home page, but any inside page of a website.  Pretty frustrating, right?  Having bad load times makes a huge difference to your customers.  I helped a new client reduce page load time from 19 seconds to 3 seconds.

A case study for load time

I am the new webmaster for a website, and it was having some issues: it was taking far too long to load the page.

Crazy slow load time

Severely slow load time

I looked at the code, and identified many issues with performance, including placement of Javascript files, linking to a CSS file that didn’t exist, and including Amazon link enhancer code that only was needed for one page of the site, but had been included on every page.

Just over one hour later, I was able to reduce the load time considerably:

Lower load time

Much lower load time

Is your website loading slowly?

I can recommend changes to your site. Let me know if you need help. Also, you can learn more about how to improve your load speed from Yahoo!

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • StumbleUpon
  • Technorati
  • Twitter

Related posts:

  1. Speed up your Mac – only thing that worked for me!

{ 3 comments… read them below or add one }

Susan January 23, 2010 at 4:35 pm

Amazon Link Enhance Code – in Thesis,where does this code get placed only once instead of placing it on every page you post?
<script type=”text/javascript” src=”http://www.assoc-amazon.com/s/link-enhancer?tag=artsu-20&o=1″>
</script>
<noscript>
<img src=”http://www.assoc-amazon.com/s/noscript?tag=artsu-20″ alt=”" />
</noscript>
It works in my sidebar widget, but not on my post page unless I add the above code.
Any ideas?
Thanks, Susan

Reply

Zack Katz January 25, 2010 at 4:41 pm

Hi Susan,
If you want to show the code only on specific pages, you need to add some code to the Thesis theme’s `custom` folder. There, you will add this to the custom_functions.php file:

add_action('wp_head', 'add_amazon_lec');
function add_amazon_lec() {
// Change the number inside is_page() to the page ID of the targeted page
// Or use is_post() if it's a post, not a page
if(is_page(5)) {
echo '<script type="text/javascript" src="http://www.assoc-amazon.com/s/link-enhancer?tag=artsu-20&o=1">
</script>
<noscript>
<img src= rel="nofollow" "http://www.assoc-amazon.com/s/noscript?tag=artsu-20" alt="" />
</noscript>';
}
}

Let me know if this doesn’t work, but it should.

Reply

Susan January 27, 2010 at 3:05 am

Thanks Zack for taking the time to write all this code out.
I want to have this functionality on all pages/post that I have an Amazon book on so the code in the php file would be for every post and page. Which part of the above code should I copy and paste.?

Reply

Leave a Comment

Previous post:

Next post: