Page Speed

Page speed is the amount of time it takes to request a page and have the page completely loaded in the browser. Page speed affects the way users feel about a brand and its products and services. Users expect the same performance on both mobile and desktop. Slow page speeds increase bounce rates.

Page speed optimisation

Content has a most significant impact on page load time:

  • Image optimization - Reduce image file size by using appropriately sized images at the correct resolution for the user’s screen.
  • Enable compression - Enabling compression on the server reduces files to their smallest size before sending them to the browser.
  • Strip and minify JS and CSS - Clean out CSS and JavaScript files of any unused code. Relics can reduce page speed.
  • Use CDN resources - Use commonly shared scripts and CSS links from a content delivery network (CDN).
  • Use asynchronous loading - You can lazy load content and script files not needed in the visible portion of the initial render.
  • Reduce the number of requests - Every request your page makes for resources adds time to your page speed.
  • Enable caching - Use cache-control meta tags for pages that are not updated programmatically from other resources.

Misconceptions

Search Engine Optimisation (SEO) experts over emphasise the importance of page speed and other factors of SEO to advocate their services, and a point to note is that any one them actually were expert, they would be making the most of that expertise by creating a web service that earned an honest income instead of preying on naive website owners.

Consquently most of what they prescribe can be misinformation.

Trouble spots

Today most new website owners start with a content management system (CMS) like WordPress because they make it easy to get started and web pages are easy to edit and update. However a common pitfall is adding too many plugins. Sure it may be cool to add a lot of different features, but unless they are absolutely necessary, each additional plugin can reduce the performance of your website daramatically. Each plugin includes its own JavaScript and CSS files so when a plugin is active, all of its associated files will be loaded on every page. In a worse case scenario, running 10 plugins can mean that an additional 10-15 JavaScript files and an additional 10-20 CSS style sheets could be loaded... additional to the 3+ CSS and 2+ JavaScript files (depending on theme) already required just to display a simple page!

Some typical download tests (using particle type pages without images):

  • WordPress latest version - 0.8 Mb
  • WordPress older version - 0.6 Mb
  • Bootsrap template - 1.1 Mb
  • Bootstrap optimised* - 0.83 Mb
  • Custom CMS - 0.2 Mb

Notice the difference between a custom CMS and WordPress? They are both doing the same thing... displaying a simple page. However the difference is that WordPress includes a whole tool kit while the custom CMS only brings with it the tools that it needs for the task. The higher download for a page using a Bootstrap theme is because Bootstrap themes are a whole toolkit and most of their bulk is the inclusion of a vast library of CSS for Font Awesome icons.

But most settle for WordPress because it is free and often already included in shared web hosting plans.

Optimising WordPress

Plugins are available for WordPress to increase page speed. But adding yet another plugin to fix the problem of having too many plugins installed can't be a good idea.

You be the judge as to whether these actions are worthwhile:

  • Page compression - as a page is being assembled by the server using PHP, unwanted spaces, line breaks and comments get removed from the web page html that is downloaded by the user's web browser. That process might effectively reduce the total download of a page by a few Kb which will be about 1% of the total download. However the web server is now performing an extra chore for every page delivered.
  • Caching - caching is applied at several points between a server and the user's desktop. The server web host caches, the user's internet service provider (ISP) caches, and the user's web browser caches.

Will yet another plugin that caches web pages be of any use? Well it might just offset the delay and increased memory/cpu usage incurred by compressing the page.

Best solution

The best solution is to deliver static web pages rather than use a CMS that assembles each page programmatically for every page requested by each individual user.

Or you could take caching to the max by using a cloudshare service like Amazon S3 or Cloudfare.

 

Please report any errors or typos here.