The final part of this mini-series is not really specific to ExpressionEngine or to the (mt)(dv)3. But the theory is relevant to ExpressionEngine deployment, the (dv) server and indeed to all websites.
A fast and responsive site is critical to user experience. Jakob Neilsen has written that a responsive site it is a strong part of ensuring a good user experience. You may not know that you can cut your load time by 40 - 50% without a great deal of effort.
The tools we’ll use to analyse page loading times are:
With these tools you’ll be able to analyse how your site is performing and check that performance improvements are actually taking effect. First you’ll need to see where you are before optimising. Fire up your page and then using the Web Developer Toolbar go to Information > View Document Size. This shows you with a handy breakdown how much your page weighs. You should be aiming for under 150k and ideally lower than that if you can. A common mistake is not to optimise images resulting in hefty file sizes being downloaded to the browser and slowing down the site.
You can also see in real time what takes time to load by using Firebug and clicking on the Net tab and then reloading the page. You can actually watch the requests as the page loads. This will certainly let you see if there is a problem.
I really like the way that Yahoo share the knowledge they learn internally. They published the YSlow Firebug extension to help developers learn about how to reduce page load times and it has certainly helped me. Yahoo have even published a video of Steve Souders sharing this knowledge internally. He states you can expect performance increases of between 40 and 50% by following the recommendations and my experience supports that.
Most of Yahoo’s recommendations are covered in the .htaccess configuration found in part one of this series. This covers setting expiry headers (something ExpressionEngine is poor at), turning off ETags, and GZipping. GZipping alone is a powerful way to speed up the information sent to the browser and hence your site. It allows you to send a compressed file that is then uncompressed by the browser. For the example above this drops CSS files alone from 21KB to 5KB. A real saving.
I recommend setting the Expires headers, GZipping and Turning off ETags using either an .htaccess file or a vhost.conf file. It immediately results in a quicker site. The other recommendations from Yahoo are also great and have resulted in much quicker EE sites for me.
So really optimising ExpressionEngine is a three pronged approach:
If you address all of these areas there is no reason that the (dv) Base should not serve you very well for running responsive websites using ExpressionEngine.
Have an update or suggestion for this article? You can edit it here and send me a pull request.
Linux and Unix watch command tutorial with examples
Tutorial on using watch, a UNIX and Linux command for executing a program periodically and showing a fullscreen output. Examples of watching a file download, a network interface come up, and showing the five most CPU intensive processes.
Build your own Vim statusline
Statuslines in Vim are not hard to create. Making your own means one less dependency in your life.
Custom Vim Bindings in tmux 2.4
tmux 2.4 made a significant change to key bindings. Here is how to support custom keybindings for versions before and after tmux 2.4