When it comes to your site or your application, speed is a feature. We want them loaded up in the browser as soon as possible and if a page fails to load or respond fast enough, it’s not uncommon for users to simply bow out.
There are always going to be tweaks and optimizations to be made respective to your project, but there are also several things that apply to any web-based project to help improve performance.
Let’s take a look.
Cache That Stuff
Simply put, caching is the storing pages and database information in memory for a period of time so that when visitors request data, it pulls information from memory rather than the database.
The thing is, caching is different depending on the configuration of your application. .NET has it’s own memory management facilities, Rails has its own caching mechanism, and functionality within WordPress can be achieved with a variety of plug-ins.
Regardless of what platform or framework you’re working with, it’s worth educating yourself on the available cache support.
Make Them Mini
Minification refers to the removal of whitespace, comments, and other extraneous characters from a document – typically CSS and JavaScript – in order to decrease the file size.
Every time you navigate to a site, the browser has to pull the page and all referenced external resources – images, stylesheets, JavaScript source files – and more. The smaller the file size for each resource, the faster the download.
There are a number of tools and resources available for doing this. The YUI Developer Center has an excellent article on the topic. My preferred tools are JSMin and the YUI Compressor.
Combine the Styles, Combine the Scripts
Minification has its advantages, but the browser is still pulling down multiple files whenever the page loads. You can amp up performance a little bit more by combining your files. Generally speaking, it’s a matter of taking all minified files and then placing them all in a single file.
This can be done manually, but the Minify project has become a solid resource in helping to improve the process.
Note that you don’t want to mix the stylesheets and JavaScript into a single file. Instead, you want to combine each set of resources into a single file of that type and include each in your page.
There are additional tools and resources that can be used to help optimize and even benchmark the performance of your site. I’m particularly interested in hearing what you guys have found useful or include in your typical workflow.
So go for it – what do you use?
Erno says
I use http://siteloadtest.com
it’s very simple and doesn’t give any dubious advices, like Page Speed. And works in any browser without plugins (I use it on my iPad).
Tom McFarlin says
This is pretty slick – I like this, Erno. Definitely solid for straight up speed tests. Bookmarking this one.
Thanks for sharing!