There are many ways to host a website, but whether you choose a large cloud provider like Amazon or a small outfit like Soft Pauer – performance is one of the key concerns customers have. Technically a well-provisioned server is capable of delivering huge amounts of data anywhere in the world, with latencies of a fraction of a second. Therefore site design and configuration will be the largest factor of a well-performing site. Here are our tips for ensuring snappy loading every time.
Use the latest version of React/PHP/ NPM/Rails
If you are using an old version of PHP, NPM, REACT, Ruby on Rails etc it’s recommended you upgrade where possible. this can improve page load times and improve security. Simply moving from PHP 5.6 to 7.3 can yield a 2-3 times performance improvement. Still worrying about those Internet Explorer 6 users? Don’t! Do update your site, as Microsoft will force them all onto Edge anyway!
Remove Unnecessary Plugins
If you are using a CMS like WordPress plugins are very easy to install like apps on your mobile. They can add functionality very rapidly but if you built your site in a number of iterations, you may find each plugins increase the page load time substantially. If you used one for page cloning or as an editor you may two plugins are doing the same job or even you don’t need the plugin activated whilst you are hosting the site. We recommend removing any plugins you no longer use or plugins you can easily do without.
Remove Historic CSS
If you a native website builder Take a look at your CSS. Are you using it for classes and Id’s you have now removed? A user’s browser will slow down if it’s trying to call empty CSS classes. P.S. We wouldn’t recommend this for WordPress user your “wordpress” theme will create a CSS file for every option you select and 90% of these files aren’t used or rendered, tinkering with the CSS is a professional’s job.
Hosting a website is tricky when it comes to imagery, you want the best resolution images on your site, but ultimately you need to consider the majority of your traffic is going to be via mobile these days, so responsive images are key. Compressing images can be done via SVG, JPGs or even WebP images as these download faster. Also considering a cloud hosting site may be a good way of ensuring the quality is good, although you can be a victim of that’s services outages, best to host them and compress them yourself.
Beware the high res photo taken by a professional camera. High end cameras often produce multi-megabyte JPGs at extreme resolutions. Many a page has fallen foul of the large banner picture!
React is the language created by the development team at Facebook, and Instagram. It is designed to efficiently create responsive web pages, and has many fancy controls developed for it that can liven up a static site. React uses modern browser features to optimize DOM usage, a performance hotspot in dynamic sites.
If you are using large amounts of text consider using AMP for when its viewed on mobile. Its created by Google and is used by popular sites such as Wired.co.uk to make their mobile sites load quicker. There are plugins for most Opensource CMS systems that will render AMP from your source. AMP will actually cache on third party servers though, so this is important to be aware of when gathering metrics as your server will not necessarily see every user directly.
If using PHP ensure that the opcache is turned on and working – this improves subsequent execution of scripts and can be a big win. PHP should also be configured in FPM process pools, though this is normally default these days.
Databases can also benefit from performance tuning if the site is large. The number one killer of database performance is missing keys – we have had many customers get huge boosts by identifying a missing key on a large frequently used table. Query optimisers are great, but often underused!
When you have lots of traffic, you can consider technologies such as http 2. This protocol can have benefits, as the connection is much better managed than in HTTP 1.1. If the site has pages using many little files and lots of large cookies it is ideal for HTTP 2, as HTTP 2 features cookie compression and something called connection pipelining that can be a big improvement in certain scenarios. However, we recommend this is a late step in optimisation, as HTTP 2 can introduce complexities for small benefits that could be found elsewhere.
Finally when first setting out to speed up your site, always start with the basics: open the Chrome development tools and profile the page – you’ll be amazed at what you see! The acid test would be to test the speed of your site with Google’s very own tool https://developers.google.com/speed/pagespeed/insights/ simply type your URL into that, there is mobile and desktop options. See our score below, We’d be interested to see your scores.