From 980fe00a74a9ad013b945755415ace2e5429c3c2 Mon Sep 17 00:00:00 2001 From: Alexey Pyltsyn Date: Wed, 27 Oct 2021 02:31:24 +0300 Subject: [RU] Remove notranslate (#2874) --- files/ru/web/performance/dns-prefetch/index.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'files/ru/web/performance/dns-prefetch') diff --git a/files/ru/web/performance/dns-prefetch/index.html b/files/ru/web/performance/dns-prefetch/index.html index 581e91d4d2..e52364a7e5 100644 --- a/files/ru/web/performance/dns-prefetch/index.html +++ b/files/ru/web/performance/dns-prefetch/index.html @@ -17,12 +17,12 @@ translation_of: Web/Performance/dns-prefetch

Синтаксис

-
<link rel="dns-prefetch" href="https://fonts.gstatic.com/" >
+
<link rel="dns-prefetch" href="https://fonts.gstatic.com/" >
 

Примеры

-
<html>
+
<html>
   <head>
     <link rel="dns-prefetch" href="https://fonts.gstatic.com/">
     <!-- and all other head elements -->
@@ -42,11 +42,11 @@ translation_of: Web/Performance/dns-prefetch
 
 

Во-вторых, существует возможность добавить dns-prefetch (и другие подсказки) как HTTP заголовок с помощью HTTP Link field:

-
Link: <https://fonts.gstatic.com/>; rel=dns-prefetch
+
Link: <https://fonts.gstatic.com/>; rel=dns-prefetch

В третьих, хорошей практикой считается использование dns-prefetch в паре с  preconnect. В то время, как dns-prefetch срабатывает только при DNS поиске, preconnect устанавливает соединение к нужному серверу. Этот процесс включает в себя DNS resolution, установку TCP соединения и установление безопасного соединения (TLS рукопожатие), если оно доступно. Комбинирование этих двух инструкций даёт возможность ещё больше сократить время ожидания для кросс-доменных запросов. Вы можете использовать их вместе таким образом:

-
<link rel="preconnect" href="https://fonts.gstatic.com/" crossorigin>
+
<link rel="preconnect" href="https://fonts.gstatic.com/" crossorigin>
 <link rel="dns-prefetch" href="https://fonts.gstatic.com/">
 
-- cgit v1.2.3-54-g00ecf