Speed matters! 5 tips to improve the speed of your website

Danny, July 24, 2019

Your website needs to load quickly. Speed is vital if your online presence is crucial to your organisation. A faster-loading website means a higher ranking in search engines, more conversions, and more sales. What measures can you take to improve the speed of your website? Here are 5 tips.

Speed tip 1 – Lazy loading for images

If a webpage has many images that all need to be loaded by the browser at the same time, the load time of the page will increase significantly. That’s a shame, particularly if images are being loaded that the visitor cannot yet see.

Lazy loading is a way to ensure your webpage loads quickly. You can set this in your WordPress site, for example, with a plugin such as WP Rocket. This ensures that images are only loaded when they are visible on the screen. In other words: images not shown on the screen will only be loaded when the website visitor scrolls to them.

Speed tip 2 – Switch to PHP 7 and HTTP/2

PHP is the most used script language for websites. Converting your website to the most recent version (PHP 7.3) will increase the speed of your website significantly. The same applies if you use HTTP/2. This is a technique that ensures that a web page, in particular its static parts, loads even faster via a secure connection. 

Speed tip 3 – Enable caching

Caching is important for a website’s speed. Caching is the term for the temporary storage of your website’s data, which ensures your website loads faster for a recurring or next user. There are different types of caching. Full-page caching is a type of caching in which the full page is displayed from the server’s memory. Full-page caching can be arranged by your host using, for example, Varnish. A major advantage of this is that the cache memory can display a page to your visitor without your web server having to do anything. This process is very fas. 

There is another type of full-page cache you can set yourself using plug-ins such as W3 Total Cache. Sometimes full-page cache is not a good option, because your page contains many elements that are aimed at one specific visitor and not others. If one visitor puts products in their shopping basket, other visitors do not want the same products to show up in their basket. In this situation you can discuss with your host what options there are for caching database queries, objects, and operation code. These are smaller parts that are used to build the page. 

There can be scenarios in which you skip website caching, but this has a very large impact on the performance of your website. Some hosts will, therefore, indicate whether or not full-page caching works for your site. With Savvii, you can check this easily. The headers in the server response indicate whether caching is ‘hit’ or ‘miss’. The header states if x-varnish-cache results in a ‘HIT’ or in a ‘MISS’. You can view these headers using, for example, Chrome’s developer tools. Go to the Network tab. When you reload the page, you will see a list being built – a kind of ‘waterfall’ of the parts of your page that can be queried. If you click on a part, you can see its headers. Check here to see if caching is reported. If the header has no ‘HIT’, contact your website builder or site host to check if caching is possible.

Yes, I want to download the customer case!

Speed tip 4 – Admin-ajax

Admin-ajax is a script in WordPress used for querying information that must not be shared with other visitors via full-page cache. With such a request, WordPress is reloaded in the background. This script can be used, for example, to show how many products there are in the shopping basket. 

A lot can go wrong here in terms of website speed. If an admin-ajax request is carried out immediately when the page is opened, this will have an impact on speed. Often this is unnecessary. A new visitor always has an empty shopping cart, so it is not necessary to query WordPress for this. Therefore, always check if you are not sending unnecessary requests to WordPress.

This could impact the performance of your website, in particular with a high number of visitors.  

Speed tip 5 – Use external sources with care

Pay attention to external sources. To call such sources, your website must query information from external parties. This takes far more time than querying information from the same domain as the site. One external query on a page is no problem. Does your website use feeds from external sources such as Facebook, Twitter or Hotjar, which are loaded at the start of the page? This will have a negative impact on the speed of your website.
It is better not to use external sources. If you really need these sources, make sure they are loaded as late as possible. 

More tips for a fast WordPress website

Would you like further information on the above tips or are you interested in more tips to speed up your WordPress website? 

Download the ‘9 tips to speed up your site’ whitepaper

Leave a reply