4 Ways to Lighten the Load

4 Ways to Lighten the Load



Website speed is a wholly subjective topic; what some people find adequately fast, others will find glacial. Here are four readily available ways you can improve the general page load speed of your websites without changing the hosting solution that it sits on.

JavaScript & CSS Minification

Minification is the process of removing unnecessary line breaks, characters and white space from your code. This reduces the compute time require when loading pages or web content as the code acts like it is compressed – without having to perform any decompression. Don’t confuse minification with obfuscation however, as the latter may make changes your code in some instances, therefore it helps to know what you are trying to achieve and follow that road. There are are free web-based tools which can help minify your code:

JSCompress

CSSCompressor

Google Code Minify

JavaScript & CSS Combines

JS and CSS combines is a simple concept that many people currently do not put into practice. ‘Combines’ places all JS or CSS files into a single referable file, this works wonder for your site load speed as most browsers can only request and download 4 JS or CSS files simultaneously. By combining your files, the server can serve the rest of your images and contact quicker, as there is less wait time on the JavaScript and CSS files which are always loaded first according to HTML. If you come across a website that loads very quickly but still contains a lot of content, chances are they have combined their JS and CSS files into single files.

There is a handy little tool called JMerge which combines JS files for you.

CloudFlare

We here at Crucial love anything that can secure or enhance your hosting experience, that’s why we offer CloudFlare to all Shared and Reseller hosting customers for free! Operations Manager Ross wrote a blog piece about how CloudFlare has helped our customers in March. CloudFlare uses an aggregated world-wide network of servers that speed up your site load by hosting images and content closer to the user. Additionally it uses an advanced traffic filtering system to keep out as many of the nasties as possible, reducing unwanted traffic and making your site more secure.

If you have one of our Cloud Web or Reseller hosting packages, open up your cPanel and look for the CloudFlare icon. You’ll also need to update your DNS to use CloudFlare’s redundant name-servers  however it’ll be worthwhile change in the long run.

GZip

GZip compression is a clever feature that many large web companies use in browsers (Google, Yahoo etc.) Back in the early Naughties, GZip compression was available but not heavily utilised, due to the end user’s processing power or browser compatibility. It works in this way:

  • Non-GZip ready websites receive a browser request for a non-compressed HTML file which may by 100KB, it then takes ‘X’ time to load. This add’s slightly higher load on the web-server and does not require the user’s browser to process anything except for the content rendering on the screen.
  • GZip ready websites receive a browser request, and through Apache, send a compressed version of the HTML file, which lets say hypothetically is 15KB. As it is much smaller the file takes ‘Y’ time to load (much less). This removes the wait time of the web-server and increases the processing demand on the user’s browser, as it has to decompress the file.

Many CMS platforms now offer GZip compression as part of the platform, so I’d recommend playing around with this setting if you are sure the web-server can service it.

Disclaimer: DYOR before putting these changes into production, always use a staging site!