From c058fa0fb22dc40ef0225b21a97578cddd0aaffa Mon Sep 17 00:00:00 2001 From: Florian Merz Date: Thu, 11 Feb 2021 14:51:05 +0100 Subject: unslug ru: move --- files/ru/web/http/headers/vary/index.html | 81 +++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 files/ru/web/http/headers/vary/index.html (limited to 'files/ru/web/http/headers/vary') diff --git a/files/ru/web/http/headers/vary/index.html b/files/ru/web/http/headers/vary/index.html new file mode 100644 index 0000000000..a9bf3238e6 --- /dev/null +++ b/files/ru/web/http/headers/vary/index.html @@ -0,0 +1,81 @@ +--- +title: Vary +slug: Web/HTTP/Заголовки/Vary +translation_of: Web/HTTP/Headers/Vary +--- +
{{HTTPSidebar}}
+ +

Заголовок ответа Vary определяет, как сопоставить будущие заголовки запроса, чтобы решить, можно ли использовать кэшированный ответ, а не запрашивать новый с исходного сервера. Он используется сервером для указания того, какие заголовки он использовал при выборе представления ресурса в алгоритме согласования контента.

+ +

Заголовок Vary должен быть установлен для ответа {{HTTPStatus("304")}} Not Modified точно так же, как он был бы установлен для эквивалентного ответа {{HTTPStatus("200")}} OK.

+ + + + + + + + + + + + +
Тип заголовка{{Glossary("Response header")}}
{{Glossary("Forbidden header name")}}no
+ +

Syntax

+ +
Vary: *
+Vary: <header-name>, <header-name>, ...
+
+ +

Directives

+ +
+
*
+
Каждый запрос должен рассматриваться как уникальный и не кэшируемый. Лучший способ указать это - использовать {{HTTPHeader ("Cache-Control")}}: no-store, который удобнее для чтения и также сигнализирует о том, что объект не должен храниться никогда.
+
<header-name>
+
Разделенный запятыми список имен заголовков, которые необходимо учитывать при принятии решения о том, можно ли использовать кэшированный ответ.
+
+ +

Examples

+ +

Dynamic serving

+ +

When using the Vary: User-Agent header, caching servers should consider the user agent when deciding whether to serve the page from cache. For example, if you are serving different content to mobile users, it can help you to avoid that a cache may mistakenly serve a desktop version of your site to your mobile users. It can help Google and other search engines to discover the mobile version of a page, and might also tell them that no Cloaking is intended.

+ +
Vary: User-Agent
+ +

Specifications

+ + + + + + + + + + + + +
SpecificationTitle
{{RFC("7231", "Vary", "7.1.4")}}Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content
+ +

Browser compatibility

+ + + +

{{Compat("http.headers.Vary")}}

+ +

Compatibility notes

+ + + +

See also

+ + -- cgit v1.2.3-54-g00ecf