how to reduce website loading time: If there is one criterion that remains influential in SEO is the speed of loading a site. If it’s too long, your visitors will leave as soon as they arrive and Google. If there is one criterion that remains influential in SEO is the speed of loading a site. If it is too long, your visitors will leave as soon as they arrive and Google will penalize your position in the search results.
In order for this not to happen, you must pay attention to certain parameters of your site, both at the level of your host and within your pages.
Let’s take a look at the factors to take into account to improve the loading time of your site.
how to reduce website loading time
1. Choosing the right web host
When it comes time to choose your host the choice is not simple. There are many and at all prices.
You might be tempted by an affordable host, or not expensive at all, but watch out. These savings may be to the detriment of the quality of the service offered.
Some host many sites on the same server, the latter is not optimized for:
- Receive traffic from dozens or even hundreds of sites at the same time
- Store large files from as many sites
When choosing your host, pay attention to the proposed server:
- A shared server will be shared with other sites, so yours must be small and not accommodate too much traffic
- A dedicated server will contain only your site and it is the ideal solution if you think to receive high traffic and/or if you have many files to put online.
Finally, check the server power, storage and associated bandwidth.
2. Avoid accumulating plugins and widgets
When designing a website one is often tempted to add many features in the form of plugins and widgets. It’s even easier with a CMS such as WordPress.
If these small additional options seem to facilitate the navigation of the user and improve its experience within the site, it is not the case for the speed of loading.
On the contrary, every widget, even the simplest it is, reduces the performance of your site. Limit the number of installed plugins.
Altogether, you understand that space is reduced to view and that the loading of your site in less than 2 seconds will be difficult.
3. Minimize HTTP requests
The loading time of a web page depends on the images, files and scripts to be loaded and displayed. However, an HTTP request is made for each of these elements.
Before you reduce the number of queries, you need to know how much your page is requesting. You can find the answer directly in Google.
Right-click on the page, click on “Inspect” then go to the “Network” tab:
- The “Name” column shows you all the files of the web page
- The “Size” column indicates the size of each file
- The “Time” column specifies the time it took to load the file
In the lower left corner you see the total number of queries that have been made.
To reduce this number, ask yourself if each loaded file is needed. If it does not, you can delete it from your page.
how to reduce website loading time
4. Reduce the CSS code
A line of code takes up space and increases the weight of your files as well as the loading time of your site. Everything you write must be useful and effective.
As a first step, reduce the use of selectors, remove spaces, and remove unnecessary comments. In the same way, go to the essentials in your code with short formulations.
For your colors, use the hexadecimal code instead of writing the RGB value.
5. Combine and minimize file size
You can minimize their code to remove formatting, indentations, and unnecessary spaces. Specific tools exist such as Minify.
To defer a file means to have it loaded after the other elements of the web page have been displayed.
For this reason, it is advisable to call an expert in the field.
7. Allow caching
When you visit a website, the elements of the page viewed are stored in a cache on your hard drive or on a temporary memory.
This means that the next time you visit the same site, your browser will load the page without making HTTP requests. The main components are already stored on your side.
Most visitors to your site arrive with an empty cache. It is therefore essential that you enable caching to dramatically reduce the loading time of your site on a future visit.
On WordPress, you can use the W3 Total Cache plugin. You can also go through your .htaccess file by adding the following lines of code:
ExpiresDefault "access plus 1 week"
ExpiresByType image/x-icon "access plus 1 year"
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType image/jpg "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
ExpiresByType video/mp4 "access plus 1 month"
ExpiresByType text/x-component "access plus 1 month"
ExpiresByType font/truetype "access plus 1 month"
ExpiresByType font/opentype "access plus 1 month"
ExpiresByType application/x-font-woff "access plus 1 month"
ExpiresByType application/vnd.ms-fontobject "access plus 1 month"
ExpiresByType text/css "access plus 1 year"
ExpiresByType text/js "access plus 1 year"
8. Use a CDN
When your site is hosted on a single server, each user who visits your site sends requests to that same server. Thus, in case of heavy traffic the time required to process each request increases, slowing down the loading time of your site for all users.
In addition, if your server is in France but a user is in Australia, your site will be slower for the latter. The information needed to display the page is further and requires more time to load.
To overcome all these problems, a CDN – Content Delivery Network should be used.
With CDN, you cache your site on a global network of servers. This way, when a user visits your site the queries are sent to the server closest to his location.
The content sent is exactly the same but it is loaded much faster.
9. Optimize images
This trick is well known and very effective. As you know, the higher the weight of your image, the more the weight of your web page increases and the longer it will take to load.
Here’s what you need to do:
- Choose the appropriate format: you must use the PNG format if your image contains a logo, icons, text or illustrations. In other cases, choose the JPG. However, never use Tiffs and BMPs.
- Resize your images: your images will be more aesthetic if their size is adapted to the content of your page. On the blog of Codeur for example, the images do not exceed 800 px wide.
- Compress your images: do not compress your images in JPG beyond 60-70% at the risk of losing quality.
By following all these tips you can significantly reduce the loading time of your site. The benefits will be important in terms of SEO and user experience.