Have you recently ordered Pizza! Who doesn’t Love Pizza? We all do. But… if it takes too long to arrive, we will quickly move on to something else to fulfill our hunger. Time is clearly a important factor in our lives. One second can change our minds, and change our life. That’s pretty much the same when it comes to our experience online.
So you’re working really hard on your blog, you have an outstanding audience, and it this Seems like the last thing you should worry about, right?
How often do you abandon a page when it takes too long to load? You’re not the only one, In fact a study on travel websites, revealed that over 57 percent of online shoppers will wait three seconds or less before abandoning the site. The younger generation expects everything to load fast, the same study also found out that 65 percent of 18-24 year old expect a site to load in two seconds or less.
So, I decided to optimize my website and reach the 100%. At first I thought it would be easy, I installed a couple plugins, optimized my code a little bit, and thought that would be enough. Yet I couldn’t be more wrong, I couldn’t get more than 70-80 % on Google’s Speed test.
Over the time I’ve been trying, and searching the web for the best way to accelerate my blog and Here’s How I Got Full Score On Google’s Page Speed:
My WordPress optimizations:
- I started with 10 plugins enabled on my WordPress installation, I disabled as much I could disable. I even disabled some of the features of Jetpack.
- i replaced the default Jquery call, with a “deferred” Jquery file hosted by Google.
- I optimized my images with WP-Smuth it plugin ( don’t forget to deactivate it after you’re done)
- I disabled the plugin that auto posts to twitter, and replaced it with a standalone script hosted on a different server.
- Used sprite images as much as i can, for those of you who don’t know what that is it’s when you combine your template images into one image, so that the user downloads one image instead of multiple images, and the css code will display the required parts of it where needed.
- I set Jquery and Disqus to lazy load
- Used the Async version of Google Analytics tracking code.
My Server and W3 total cache optimizations:
- I installed PageSpeed Module on my server, It’s a apache module that optimize your site automatically. It minifies your css and Html, and Optimizes your images. In addition to many other critical features.
- I installed Memcached, and apc php module on my server. Two caching agents that optimize the serving of php pages
- I Installed W3 TOTAL Cache plugin on my WordPress, and configured it to use object cache, page cache(using memcahed and apc), and add expiry header to my files.
- I configured W3 Total Cache, to use one of my other servers(plus.ultgate.com) as a cdn to serve some of my files.
With all of that I reached a score that varies between 91 and 100%. I had 3 problems left. The first is that Google is grading me for not caching, compressing , and minifying the files called by Google’s Adsense. That is impossible to do, as the files are served by Google and only Google can do that. And again since Adsense loads in iframes, Google deducts further points for not Prioritizing the load of the ads. Which is also impossible because Adsense loads ads after the page loads.
So I was left with One Site issue that Can’t be solved: the server response. Since mysite’s cache gets refreshed over the time, it’s impossible to always load pages from the cache, which will make the server response time vary from below 0.2 seconds for cached pages, and the maximum of 0.5 seconds for those that didn’t get cached yet. And that is totally normal! While simple html pages are easier to cache, and get a good server response, the result i got is the best result anyone can get with a blog.
With that said, I’ve been working on optimizing my blog, to reach the highest speed, and I finally did it. Now, I can finally brag and say that I have The Fastest Blog and website in Town, or even in the whole region.