How to Increase a Website Page Speed

Speeding Up Websites for Joy and Profit
The web is becoming not just a platform for delivering documents and content, but a full-fledged application run time for delivering rich multimedia experiences. This complexity comes at an unfortunate cost, as websites become increasingly heavy and slow. Not only are faster sites more pleasant to use, but they get prioritized in Google search results. Here are three tips to make pages load more efficiently.

The most obvious way to speed up websites is by making them smaller. Large, unoptimized images can take seconds to download. Uncompressed, complex style sheets take time to transfer and render. JavaScript assets must not only be retrieved, but also run on the JavaScript engine. The situation is so bad that an article in The Verge criticizing the mobile web last year drew its own flack for including megabytes of assets that could quickly burn through data limits.

To address this, remove or compress unneeded assets. If scripts or stylesheets are unnecessary, trim them. Minify JavaScript and stylesheets to avoid transmitting unnecessary data. Shrink image sizes, and compress them with algorithms more suitable to web presentation. Finally, if your web server or host allows for asset compression, enable it to even further reduce the size of everything sent over the wire.

The amount of data transferred is only part of the issue. Site publishing tools like WordPress often regenerate every page each time it is accessed, even if that page rarely changes. In these instances, even the most optimized pages can feel slow as they take seconds to generate.

Many tools offer the ability to enable caching, a system that stores page content after it is created. WordPress has various caching plugins that keep page content around between loads. When content changes, such as by adding a post or leaving a comment, the cache is updated and the new page content left in place.

Even with smaller pages and caches, sites can feel slow if they take time to download. Audiences on the internet are global, and transmitting pages and images to remote locations results in slow speeds and broken downloads.

This is where a content delivery network can help. CDNs sit between websites and their viewers, and act like caches on a global scale. Say a website is hosted in Dallas, but is viewed by someone in London. Web requests travel from the reader, through the CDN and finally reach the website. If the CDN has a server near London, that server downloads and stores a copy of the website when it is first accessed. Subsequent site access retrieves the version stored in London, thus saving the longer and slower download all the way from Dallas.