I decided to study the topic of meta-tags in more detail and came across such tags:

<meta http-equiv="x-dns-prefetch-control" content="on"> <link rel="dns-prefetch" href=""> 

How do they work and what problem do they solve?

    1 answer 1

    Briefly - you tell the browser what addresses can be the resources of your page (pictures, scripts) so that it can split the names immediately. On a very slow internet, this can save up to 0.2 seconds per request.

    • KoVadim, thanks for the reply. Could you describe the process of work in more detail? For example, I have two pictures in html img (src = "test.ru/image-1.jpg") img (src = "test.ru/image-2.jpg") When he first meets test.ru he he rezolvit. When he meets him a second time, does he rezolvit him again or is the result cached? Or am I not understanding that? - psycho_Octopus pm
    • one
      the second time, the browser is likely to use the cached result. Moreover, he will most likely use it for some time, even after refreshing the page or switching to another page. - KoVadim
    • Sorry for the stupidity, but what gives prefetch? After all, when you first access the address is resolved and the result is cached. - psycho_Octopus
    • one
      very simple example. Suppose you have a gallery and pictures loaded on your site dynamically from a dozen different sites (for example, maps. Sites are different, since cdn is spread out on different sites to optimize the load). As soon as the user performs the specified action and the browser will be forced to upload the image, he will need to cut the address. And this may cause certain lags. If the browser immediately specify the possible addresses, then it can cache them (the few seconds while the user looked at the site will be enough). And these lags can be reduced. - KoVadim
    • Indeed, I did not think about dynamic content. Using prefetch for dynamic content seems logical to me, but not for static images. Thank. - psycho_Octopus