Top Reasons for Slow Website Loading

Users have long been accustomed to high-speed Internet, so any delays in loading the site negatively affect the conversion. There is data from many studies showing that if the site does not load within 3-4 seconds, then up to 40% of visitors are ready to close it.

In fact, there can be many reasons why a site is slow. Experts of Nic.ru, the largest domain registrar for business, singled out the main ones and explained how these problems can be eliminated. These tips will help anyone whose sites are built with back-end languages.



Overloaded hosting

One of the main reasons for website slowdown is the increased consumption of hosting resources. This happens when site traffic increases or bots begin to display malicious activity.

Therefore, the first thing you need to do is check if your site on the hosting uses a large amount of RAM if the tariff limits are exceeded if the load on the CPU (central processing unit) is increased.

The necessary statistics can be viewed in the hosting control panel or you can contact the hoster for these data. Exceeding the norm will be displayed in sharp jumps on the chart. You don’t need to be an expert to recognize them.

Check also the site access logs, look at the requests for the period of high resource consumption. If it comes down to the increased traffic to your web resource, upgrade to a higher tariff plan. Of course, this will not solve the problem if the attendance is actually the same.

JavaScript and CSS problems 

In the process of loading the site, the browser, as it were, “assembles” the page from various elements of its design, gradually building the layout that you will eventually see. This process is called page rendering.

However, this process can be significantly slowed down by incorrectly configured JavaScript and CSS files. You can check the correctness of the scripts using PageSpeed ​​Insights. This service will analyze your site and show what needs to be optimized and what adjustments will help speed up the site.

Here are the basic steps you may need to take in this case:

  • Set up lazy loading JavaScript. Large files should be loaded at the end to allow the main content to appear on the page first. To do this, set up a call to the external JS file before the </body> tag;
  • Place links to CSS files in front of links to JS files. Thanks to this action, the page will load in stages: header, logo, headings, top blocks, etc. Otherwise, all elements will be loaded at once, which will slow down rendering;
  • Use asynchronous script loading as well. It will allow the browser to load the HTML page, even if it has not yet processed the js and css files;
  • Optimize your code by removing blank lines, unnecessary tabs, and other unused elements.

Problems with external content sources

Often, to save free space on hosting, links to external sources of “heavy” content – links to pictures, videos – are added to the site script. But no one can ensure you against problems with another server at a time when your site needs to download the necessary files from it. This will inevitably cause problems with your site’s loading speed.

External links in the site code are easy to check. Open your website in the Google Chrome browser and take the following steps:

  • press F12;
  • then open the Network tab;
  • right-click to open the menu;
  • include URL and/or Domain columns;
  • See what content is stored on your domain and what on someone else’s server. Maybe you can transfer something to yourself?

 

Database queries not optimized

The loading speed of sites with a large amount of content – for example, online stores or news portals – directly depends on the speed of execution of scripts and database queries.

If the database is not updated too frequently, you can save the query results to a file — it will load faster than the database itself is accessed. Unless, of course, this is a very “heavy” file.

To speed up the loading of the site, you should clear the database of obsolete and irrelevant content. For example, these may be inactive accounts. And you should also update your PHP versions regularly. Each new release provides new opportunities to increase productivity.

Along with these tips, one of the main methods of optimizing database access was and remains competent indexing. Queries should be designed to minimize the use of temporary files and file sorting operations.

The faster the database server executes queries, the faster it will retrieve the data it needs, form a response to the client, and free up memory.

The Query Monitor and Debug Bar plugins can help you identify slow database queries.

Incorrect caching settings

Caching makes web pages load faster. How does this happen? A cache is a kind of buffer in which data that is used most often is stored for some time – for example, JS and CSS files, images. When you visit the same site a second time, the browser does not reload it from scratch but accesses the cache, where some of the saved elements of web pages are already stored.

Caching methods are different:

  • With the help of the СDN service. All necessary elements are cached on an external server, which reduces the load on your hosting. But, if you decide to turn to the CDN server for caching, you must make sure that it is stable. If you have a problem with this, you will only aggravate the situation with slow loading of your site;
  • PHP caching. One of the most popular extensions used for this is Opcache. Thanks to this extension, the execution of scripts in the PHP language is accelerated;
  • Caching pages on disk. You can cache pages as files if they are all generated by your site’s scripts. Then the user’s browser will download them entirely.

Caching is configurable using various plugins. Check with your webmaster which plugin will be the best for your web resource.

Media content is not optimized 

Caching is a good way to speed up website loading. Another way is to compress the data. The gzip tool will help with this: it compresses various elements of the site, including the JS files and styles themselves. You can connect GZIP on the webserver itself, through the .htaccess file, or in the CMS settings.

However, you should not resort to this method if the files are already small. This, on the contrary, can negatively affect the website loading speed.

Pictures and videos can also be quite “heavy”, and this will lead to a decrease in site load. All you need to do for this is to optimize your media content. This is not difficult.

Pictures can be re-saved in any graphics editor while setting such characteristics that will reduce the volume of the image. To reduce the size of the graphic file, in particular, you can use the Squash utility.

If there are a lot of images and it is inconvenient to tinker with them manually, connect an optimization plugin to the site. For example, the same Robin, Image Optimizer, Optimus, WP Compress are able to compress the image in half, without degrading its quality.

Similar programs for video optimization are HandBrake and Blazemp. Videos can also be converted to HTML5 compatible formats: MP4 or WebM. This can be done online using the video.online-convert.com resource.

Overloaded with ads 

Everything should be in moderation. This is especially true of advertising, the abundance of which provokes users to immediately leave the site. And besides, banners, pop-ups, embedded video ads slow down the loading of your site. It takes time to process additional HTTP requests.

So the advice is simple – keep your ads to a minimum.

Malicious codes

Some malicious programs deliberately slow down websites by launching resource-intensive processes on them and thereby overloading the server. Such a program can be introduced by competitors of your company or “stick” to the site accidentally if it is distributed automatically through certain vulnerabilities in the code.

You can check your site for viruses and remove malicious codes using web scanners. RU-CENTER has a special tool – Site Antivirus. He will prepare a detailed report with a list of threats: you can independently study and remove them.

Bots 

Bots are programs that can perform certain actions on your website, in particular, malicious ones. They can register accounts, clutter up the customer base, copy and replicate your unique content, create fake orders in online stores. Bots cheating behavioral factors can lead to a decrease in your site in search results. And, of course, bots can increase the load on the server and slow down the loading of your site.

How to get rid of bots?

Check the site access logs. Common bots are ahrefs, mj12, semrush. Their presence can be limited by closing access to your Internet resources. To do this, use the .htaccess file on the hosting, pasting the code:

RewriteCond %{HTTP_USER_AGENT} ahrefs [NC,OR]

RewriteCond %{HTTP_USER_AGENT} semrush [NC,OR]

RewriteCond %{HTTP_USER_AGENT} mj12 [NC]

RewriteRule .* – [F,L]

Congested network

Don’t overlook the fact that the reason for your site’s slow loading may not be related to the site itself. The fact is that the exchange of data between the user’s computer and the server often passes through dozens of different nodes. Some of these nodes may be delayed or not transmitting data at all due to a system error or some filtering software.

Or the bandwidth itself may be limited on a particular node.

Network diagnostics are performed using the WinMTR or tracert (traceroute) utilities. Once you have identified a “network” problem, you can contact your hosting provider for support.

Resume:

So, website loading speed depends on many factors. These are well-written scripts, the amount of content, optimized databases and scripts for accessing them, various methods of caching and compressing data. There are third-party reasons that can negatively affect page loading speed, for example, malicious codes or network congestion.

Even if you do not have web-master skills, you can fix some problems yourself using the tools we offer. In difficult cases, for example, if you need to configure loading data from third-party servers, choose a plugin for caching, optimize code and database queries, only a specialist can help.

Read More:

 

Leave a Comment

Your email address will not be published. Required fields are marked *