GPWA Times Magazine - Issue 27 - February 2014

Let’s plug in CloudFlare with the Basic Optimizations option and see what happens. After waiting for 24 hours for the DNS chang- es to kick in, the loading time decreased to under one second. Nice. Let’s choose the Full Optimizations option on CloudFlare. I’ve checked the site and it loads without errors, which may hap- pen with this option if there’s a conflict somewhere. Nice speed improvement. Now I’m going to remove some modules and a couple of menu icons I don’t need in an effort to reduce the num- ber of HTTP requests and the page size. The change is minimal. This goes to show that I’ve reached the limit and everything I do from this point will require a lot of work for a minimal return. This is as good as it can get unless CSS sprites are used. Of these ~0.50 seconds, roughly 0.18-0.22 seconds are used by the server to process the order when the user requests a Web page, 0.05 seconds go to various delays and the remaining 0.20- 0.25 seconds go to actual content delivery. I never get below 0.35 seconds no matter what I do. If this same site were hosted on a server which needed three sec- onds to process the request (some shared server), the loading time would be around 3.30 seconds. A good server is the key. CloudFlare doesn’t seem to combine CSS into one file, leading to 15 extra HTTP requests in this case (my template happens to have 16 separate CSS files), so I’m going to install a plugin which does that for me. And, surprisingly, this is what happens: The results are actually worse. The plugin indeed does what’s ad- vertised and reduces the number of HTTP requests, but it uses 0.25-0.30 seconds of server time for its own work, leading to a longer loading time of the page. This is why speed-up plugins are usually a bad idea. You speed up your website by stripping features, not adding them. You’ll notice the Perfection Grade varies with different tests, usu- ally because of the nature of the content, and the improvement from 70 to 92 happened when I removed the Twitter module dis- playing latest tweets (I’ll add it back later as it doesn’t seem to impact the performance much). Perfection grades are not some- thing you want to focus on, as you might get a perfect score and still have a slow site. That’s just a set of rough guidelines which you may use to get ideas on what area to improve next, but some of those guidelines may not apply to your site or may offer a min- imal improvement for a lot of work. Also, perfection grades don’t take your server quality into account, and they try to make sense of your site without actually knowing anything about it. What counts is the loading time. Neither Google nor your visitors really care if you “serve cookies from a static domain” or not; they care how fast your site loads, preferably in under 2.0 seconds. As Eddie Van Halen used to say when told some of his riffs are out of key, “If it sounds good, it’s good.” When speeding up a web- site, speed is the target. If it’s fast, it’s good. Who cares if it’s out of key? On the same note (pardon the pun), a tool checking the loading speed is inferior to your own testing, e.g., opening the page, checking to see if it feels responsive and asking a friend to do the same. You can build a perfect site in terms of speed optimization, but just like in most other ventures, when you’re 80 percent done you’re done, as it doesn’t pay off to become a website speed spe- cialist for an additional 0.1-second reduction in loading time. It’s enough to just be good at it and to understand the concepts so you can apply them to your next site. Remember, if you want to speed up your WordPress site, remove all plugins you can live without (even the speed-up ones), remove unneeded content (images, icons, Flash, external content), make sure the images are optimized, clean up your site in general, get a better server and use a CDN. And don’t spend too much time reading articles on the Internet asking you to code .htaccess and to install plugins and add far future Expires headers and what- not. It’s easier than that. Just get a good server and a CDN, and keep the content of your site clean. If you still have a need for speed after that, then by all means dive into code. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Dan Horvat has been described as a serial entrepreneur, and has been involved in the gaming industry for several years on both the operator and the affiliate side, most notably with the sports betting website Oklade.net. Apart from his online and offline business projects, he is majoring in computer science at Harvard University. 37 Speed up your WordPress site

RkJQdWJsaXNoZXIy NDIzMTA=