Why does your site load for a long time?
Not at all, the whole problem is that you can have time to drink 5 cups of tea before the page of this resource loads in the browser. No matter how good, informative, and useful the site may be, it needs to work quickly. If this requirement is not met, in most cases the resource will lose its visitors, who will prefer even a lower-quality, but faster portal, in return. Therefore, I would like to talk about the reasons for the slow operation of your resource, so that later you can move on to methods to eliminate these causes.
First of all, this material will be useful to owners of serious resources, since for the most part the problems with page loading speed concern them. However, business card site owners should also not neglect optimization rules, especially if their site is based on CMS.
Before you begin to consider methods of website acceleration, you need to familiarize yourself with the algorithm for obtaining a web page, in order to understand what exactly affects the load time of your site and how to make this time the smallest. As an example, take a standard dynamic page with the presence of java scripts, php code, connected stylesheets and, of course, native html.
So, when you enter the address of such a saturated page in the address bar of the browser and after a few seconds you observe its visual interpretation on the screen of your monitor, the following happens at a level hidden from the user: the browser sends a request for receiving this page using the http protocol (hypertext transfer protocol) to the server on which it is stored.
The server, in turn, processes this page, executing its php code, if any, accesses the database server, if necessary, then generates all this in html code and returns it to the browser, which gives this html code to our usual mind. It is worth noting that the server does not need server help to execute java scripts for the browser.
It is time to approach the key point and, finally, to figure out what is the reason for the long loading of the page, its long formation. The fact is that, in addition to the request to get the page code itself, the browser must also send requests to all external resources, the information from which this page should contain, be it tables with styles, pictures, java libraries, background images – in short, everything that is necessary for the correct display of your site.
In addition, just sending a request is not enough; you also need to execute it. If a high-resolution image is loaded in the code of a web page as the background of its content, it takes time to load it. Thus, the answer to the question of what components add up to the display of a web page, pops up to the surface. The site loading speed directly depends on the number of requests sent by the browser and on the time of their processing.
So look now yourself. Do your site pages use a separate style file? This means that the browser will send a separate request for this file. Is there a java script in the page code, for the execution of which it is necessary to connect one or another library? Again the browser sends a request and connects this library. Is there a separate picture for each article on your site? The browser will send a request for each and each will load. As a result, it turns out that the fewer requests the browser will execute upon loading, the smaller the size of the received pages on your site will be, the faster Web users can see it on their monitors. However, this advice cannot be called good from the point of view of optimization, since there is not much optimization in it.
Well, so what can you do if you can’t do with the small size of web pages – if they contain photo galleries, connect several style sheets, process java scripts, in short, make the browser sweat a lot before it can present your user portal in all its glory?
Do not despair, there are many ways by which you can accelerate your site to high speeds without sacrificing its information content. You will learn about these methods in the next article.