One of the key technical considerations for a website is how to reduce bandwidth usage and conserve disk space. This is a vital factor in determining how the website scales up as needed, without any adverse effects on performance. Here, we will explore a number of technical concepts and strategies that allow your website to load much faster and dramatically increase its capacity without any significant increase in cost.
Caching has been around since the dawn of the world wide web, and remains an important strategy for optimizing web performance. It involves creating and serving static copies of dynamic pages accessed from a website, similar to what a browser does when you surf the web. Pages on a website where the dynamic content displayed is rarely or never updated should all be cached for maximum performance.
There are three main benefits achieved with proper caching:
A cache reduces the time it takes to retrieve objects, so a visitor to your site will perceive it as being quite fast;
It reduces the number of database requests your server must process, allowing it to accommodate many more simultaneous visitors; and
It helps to reduce the total amount of traffic on the Internet, and thereby contributes to improving both performance and economics for everyone.
There are a number of ways to deploy caching at many different points between the browser and the server.
The implementation of a caching system for dynamic content will vary according to the platform of your blog or website. Wordpress, a heavily used blogging CMS, has many plugins that can be used to cache dynamic pages and serve them as static files. The most recommended and supported caching plugins are WP Super Cache, W3 Total Cache and Quick Cache.
If you could move caches away from your server and put them closer to your visitors, this would provide a tremendous performance boost. Caches are not inherently designed to do this; however, Content Delivery Networks can. CDNs take control a portion of your websites structure (typically, the domain name system) and managing distributed cache-like devices called edge servers.
Using CDNs, your website will load two to three times faster, you may notice improvement in your search engine rankings (Google now considers page loading speed as a ranking factor) and you can realize significant monetary savings as your server bandwidth requirements decrease. You can build your CDN yourself, although this will require additional cost and technical know-how, or you can contract a third party provider.
Here are some points to consider before you commit to deploying CDN technology for your site.
Image files are one of the biggest culprits when it comes to disk space usage. Most large websites have many images on every page that can consume gigs of storage space from a hosting account. Simply compressing your images to a reasonable file size with minimal quality loss can go a long way in providing a more efficient, quicker loading website.
There are many programs available that can be either downloaded to and ran from your PC, used from an online image optimization tool or even plugins for Wordpress that can automatically compress all images uploaded to your account. Just don't go overboard; compress your images that aren't already compressed enough to save on disk space, but not so much as to severely degrade image quality. A good balance between optimal image quality and file size must be reached.
The improvements offered by caching and content distribution networks can further be enhanced by compressing files that will be delivered by both the web server and the edge servers. Compression here does not aim to reduce file size on the storage media, per se. The aim is to optimize the files for delivery through the network. HTML is notoriously redundant, and compression algorithms have been developed to zip down HTML files into tight, little bundles that could then swish through the network, where on the other end a browser can unzip and render them. This can often be accomplished with GZip, a compression and decompression tool. GZip can be enabled in cPanel if your server supports it.
Most modern browsers are equipped to handle compressed files on-the-fly, and when they make a request to the web server, they also indicate that they can take the compressed version, if it exists. The compressed version is sent over, saving on bandwidth and loading time, and generally keeping everyone happy.
Ideal as this arrangement may appear, there are a few things to consider:
Perhaps the easiest and quickest way to get started with optimizing your website performance and lowering bandwidth usage is to clean up your HTML, CSS and other coding. Redundancies, inefficient coding, extra white space and support for archaic structures add extra weight to your pages, which waste bandwidth and increase loading time of web pages. Even with compression, caching and CDNs, it still makes sense to optimize your code. As mentioned earlier, there are still people who use old browsers not capable of handling compressed files. Properly optimized HTML, JavaScript and CSS files can shrink by some few thousand bytes after optimization. That may not sound like much, but with a popular website receiving thousands of daily visitors accessing those files, it will dramatically decrease bandwidth consumption and improve page rendering performance.