Thursday, August 12, 2010

Speed 2

It's a bad choice of subject, I know. It really is one of the worst movies ever made. Rated 3.4 out of 10 on imdb.com. Welcome to another edition of The Daily Feed. We're continuing our journey into building super fast blogs and websites this week.

If you've been following the news this week you've probably heard about Google losing a few friends over the Net neutrality debate. The coverage of the story is exhausting. ArsTechnica, OReilly Radar, GigaOm, ReadWriteWeb, are all making a lot of noise about it today. The debate is a complex one, but at the core is the following question: Is it OK for bandwidth providers to decide which websites get to be fast on their networks? And to take it a step further: Is it OK for them to charge you (the blogger or webmaster) so that your website is fast for people who use their network?

The Net neutrality debate really affects websites that serve up bandwidth intensive content. Small sites that serve up a lot of audio, video and downloads will have a hard time competing against larger corporations who can afford to pay the bandwidth czars for faster access. So if you're in the States or another country that's having this debate, make sure you make some noise with your local politicians and make sure they're siding with you on this issue.

My email yesterday covered why it's incredibly important for your blog or website to be blindingly fast. Net Neutrality is yet another reason to spend some time assessing site speed. So lets chat about how you do that.

To get you started, Pingdom provides a easy to use free tool to get a quick view of how fast your site is. Go ahead and try it now.

When it comes to site speed the two most important variables are:
  1. How much data is transferred and
  2. How many components (images, style sheets, scripts, etc) does your page have.
Back in the bad old days of 2400 bps modems we used to be obsessed with making images and HTML pages as small as possible because when you're sucking  your data through a very slow connection like a modem, page size made a huge difference. But many of the people who access your site these days are on broadband. Crunchgear published an article last year that mentions that the average bandwidth speed in the USA is now 4.8 Mbps. At that speed you can download an average web page of 500K in well under 1 second.

What matters more than page size these days is something called latency. So what the heck is latency? It's the time it takes to make a connection to a web server and start receiving the first few bytes of whatever page or image you've requested. When you have hundreds of images and other components on your page, latency makes a big difference to page load time. So before you go nuts trying to compress all your images down to a few bytes each, first focus on the number of page components and try to get that down to as few as possible.

I feel at this point I need to say something about Feedjit, since our Live Traffic Feed is a page component that is used by about half a million bloggers. We've put a lot of effort into making sure Feedjit loads as few components as possible on your blog and that those components are cached by browsers. So rest assured that Feedjit is probably the fastest loading component on your blog. OK, now that I've made sure you're not going to get rid of your favorite real-time stats tool, lets carry on...

Once you've made sure that every component on your blog is something you actually use and want to keep, then take a look at the sizes of images, flash animations and other bandwidth hogs. Generally you want to keep your images under 20K if possible - although I have some high quality stock photography on my own website that weighs in at around 50K per image. I made the choice to sacrifice a bit of speed for image quality in those cases and it hasn't affected page load time significantly.

Here are a few metrics that you can compare yourself against:
The Pingdom tool I mentioned at the beginning of this email is not bad, but when I'm fine tuning websites, I have four favorite tools and I use them interchangeably. Here they are:
  • YSlow - I don't actually use it that much anymore, but give it a whirl. The "grades" it provides are useful summaries. 
  • Firebug plugin for Firefox - I still use the Network tab in Firebug the most but I'm rapidly switching over to....
  • The Chrome browser's developer tools. If you only learn one advanced site performance tool, invest your time in Chrome. Trust me this will become the industry standard over the next year or two in assessing site performance. This page is a great introduction to the tools.  
  • Safari's developer tools are very similar to Chrome, and I no longer use this much in favor or using Chrome instead. 
Seriously geeky section for more advanced readers:

Consider yourself warned. In July of this year the Chrome team announced that they're going to be supporting the web timing specification in the next version of Chrome. Apparently Internet Explorer 9 is going to support this too. The result of this is that as the next generation of browsers begin to support this, companies like us who provide real-time analytics can tap into those API's and give bloggers like you MUCH more detailed stats on how your site is performing for each user who visits. The web timing API lets us ask the browser things like "How long did it take from the moment the previous website started unloading until the very first byte was sent from this website?" 

One more advanced tip: Ever heard of IP Anycast? It's a technique all the really big companies use to put their DNS servers geographically closer to people who visit their website. It reduces DNS latency (the round trip time it takes to look up a website address). We use it at Feedjit and gave us a huge speed boost. Check out DNSMadeEasy.com - they are one of the lowest cost providers of Anycast. 

Tip of the day:

Ever heard of the book "Influence" by Cialdini? It's a great book on how we're influenced to make decisions, especially buying decisions. Whether you're writing a blog post, running a business or buying a car, it's a great guide to how we're influenced. It has a few great anecdotes including why it's so hard to buy your child's favorite toy at Christmas and why doubling the price of something might just double your sales. 

Tomorrow we're going to chat about page structure and how it affects load times. 

Regards,

Mark Maunder.
Feedjit Founder & CEO




--
Feedjit respects your privacy. Please click here if you would
like to stop receiving these emails or if you have joined a list and
would like to unsubscribe. You can contact us at <support@feedjit.com>.
Our postal address is: 1916 Pike Place, Suite 12365, Seattle, WA, 98101.