I’ve spent the better part of the last 2 days working and fixing stuff on my site. Over time a lot of things have crept up and have made the performance of my site slow. While not perfect, I think I’ve fixed most of the big stuff that was causing problems.
- Fixed image loading. I have a very photo intensive site. That isn’t going to change. One of the big problems was that on my front page, I display the last 7 of my daily photos. The problem was, it was loading the 1000px wide images which is shown on the page and displaying it as a 500px wide image. Because we are talking total area, each image was 4x larger than it needed to be. Multiply that by 7 and you have a big problem. My friend Jason made some quick changes that made it only load 500px wide images. Smugmug image resizing made it easy to do. This was far and away the biggest improvement I’ve made.
- Moved to W3 Total Cache. I was using WP Super Cache, but W3 Total Cache seems way better. It not only caches files on the server site, but it will also do browser caching and minify your scripts. Unfortunately the aforementioned daily photo script is really fussy and breaks when it is minified, but other than that I have much better caching going on.
- Removed scripts. I got rid of a bunch of stuff including the Compete.com and Quantcast analytics scripts. Frankly, they weren’t helping Compete actually calculate my traffic (off by a factor of 4) and no one has ever cared about Quantcast that I know of. I also got rid of the Google FriendConnect widget and the Google Translate widget. Stats showed no one was using the translate tool and I have no idea what FriendConnect is for. I also got rid of the LinkedIn button when I saw I got only 7 visits from LinkedIn over the last month.
- Deleted unused code. I had accumulated some code which I had commented out over the years. I figure if I can go a year without noticing it, I probably don’t need it.
- Implemented Asynchronous scripting. I’ve noticed several times when I’d try to load a page and it was hanging trying to load Google Analytics or the Facebook widget. I replaced the code so that it loads asynchronously. That means the page wont stop loading to wait for that script to load. This is actually a pretty big deal.
- Removed extraneous images. When my site was built, they put a my logo at the bottom. Why? I have no clue. Dumb spot for a logo. It was just another image that had to be loaded on every page. Gone!
I also spent time tweaking my Smugmug site. I set default thumbnails for each gallery, which doesn’t sound like a big deal, but it really is. Not every image makes for a good, square thumbnail. By picking images which make good thumbnails, I think I made the overall photo site a lot cleaner. I also changed the Smugmug theme and redid my bio at the top of the page.
Using the Google Page Speed tool, I was able to compare my site’s performance vs other big sites. My performance is comparable or better with Mashable, Techcrunch and the Huffington Post. It isn’t perfect but it seems to be well within the range of acceptable performance. It scores an 88 or 89.
I still have some things I want to do to improve performance:
- Fix my daily photo script. This thing has been flaky since I got it. If I can fix it, then I can minify my scripts, CSS and HTML.
- Tweak the social media buttons. All these Facebook, Twitter Google and StumbleUpon buttons come at a cost. I’m not sure I’m implementing them in the most efficient manner or even in the most strategic manner.
- Move background images to Smugmug. The few images my WordPress theme uses are hosted on my blog. There aren’t many and they are small, but it would be more efficient to move them to my photohosting site. It would cut down on bandwidth and http requests for the web server.
- Clean up the database. I have a plugin for WordPress I run about twice a year. It will delete the old versions of posts which clog up your database. I need to do that soon.
- Institute CSS Sprites. I have no idea how this is done, but it would combine all my background images into one image, cutting down on bandwidth and http requests. This is pretty low on my list as few sites seem to actually do it.
I added a xmlns:fb=”http://www.facebook.com/2008/fbml” xmlns:og=”http://opengraphprotocol.org/schema/” to my < html > tag, which solved my problem of duplicate titles showing up when I posted a link in Google+.
I also changed the way titles on my posts render. They were showing the name of the blog in each title and I removed that so now it is just the title of the post and nothing else.
I’ve also been going through my Google Analytics data for the first time in months. Actually that is what spurred the performance binge when I realized a full 1/3 of my search engine traffic comes to my front page. I figured if I improve front page performance would give me the biggest bang for my buck.
Even though my search engine traffic is at an all-time high, most of it is from people searching for me. I have only 12 internal pages which get more than 100 visits per month from search engines. Most of those pages are old pages from when I started blogging and tried doing link building for individual articles.
One mention on even an semi-good blog seems to drive more traffic over longer period of time than a good article will drive from Google. I’m still getting over 400 visits per month from my guest post on the Four Hour Work Week site.
I had comments from people about the crazy images I have the bottom of my pages. I switched services from Wahoa to MGID. That got rid of the disturbing images that sometime show up and it also increased my traffic. I get about 300-400 visits per day from them.
Surprisingly enough, one of my best sources of traffic in terms of quality is Lonely Planet. They don’t drive a ton of traffic, but what I get spend a lot of time on my site and they view a lot of pages. I’ve been making an effort to tag my posts correctly so they can pick them all up.
I have a lot more little things to do over the next few weeks.