aboutsummaryrefslogtreecommitdiff
path: root/files/ru/web/http/заголовки/access-control-max-age/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'files/ru/web/http/заголовки/access-control-max-age/index.html')
-rw-r--r--files/ru/web/http/заголовки/access-control-max-age/index.html69
1 files changed, 69 insertions, 0 deletions
diff --git a/files/ru/web/http/заголовки/access-control-max-age/index.html b/files/ru/web/http/заголовки/access-control-max-age/index.html
new file mode 100644
index 0000000000..0d5d63b8b0
--- /dev/null
+++ b/files/ru/web/http/заголовки/access-control-max-age/index.html
@@ -0,0 +1,69 @@
+---
+title: Access-Control-Max-Age
+slug: Web/HTTP/Заголовки/Access-Control-Max-Age
+translation_of: Web/HTTP/Headers/Access-Control-Max-Age
+---
+<div><code>Заголовок ответа сервера</code><strong><code> Access-Control-Max-Age</code></strong> сообщает браузеру насколько {{glossary("предзапрос")}} (эта информация содержится в заголовках {{HTTPHeader("Access-Control-Allow-Methods")}} и {{HTTPHeader("Access-Control-Allow-Headers")}}) может быть кэширован и опущен при запросах к серверу.</div>
+
+<table class="properties">
+ <tbody>
+ <tr>
+ <th scope="row">Тип заголовка</th>
+ <td>{{Glossary("Заголовок ответа")}}</td>
+ </tr>
+ <tr>
+ <th scope="row">{{Glossary("Запрещенное имя заголовка")}}</th>
+ <td>нет</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Синтаксис">Синтаксис</h2>
+
+<pre class="syntaxbox">Access-Control-Max-Age: &lt;delta-seconds&gt;
+</pre>
+
+<h2 id="Параметры">Параметры</h2>
+
+<dl>
+ <dt>&lt;delta-seconds&gt;</dt>
+ <dd>Количество секунд, на которое запрос может быть кэширован.<br>
+ Максимальное значение в Firefox составляет <a href="https://dxr.mozilla.org/mozilla-central/rev/7ae377917236b7e6111146aa9fb4c073c0efc7f4/netwerk/protocol/http/nsCORSListenerProxy.cpp#1131">24 часа</a> (86400 секунд), в Chromium <a href="https://cs.chromium.org/chromium/src/services/network/public/cpp/cors/preflight_result.cc?rcl=43ab0ff8fdcf3a10a89c4d0d0421f461967f2bd5&amp;l=36">10 минут</a> (600 секунд). Chromium также определяет значение по-умолчанию <a href="https://cs.chromium.org/chromium/src/services/network/public/cpp/cors/preflight_result.cc?rcl=43ab0ff8fdcf3a10a89c4d0d0421f461967f2bd5&amp;l=26">5</a> секунд.<br>
+ Значение <strong>-1</strong> отменяет кэширование, отправляя предзапрос перед каждым запросом.</dd>
+</dl>
+
+<h2 id="Примеры">Примеры</h2>
+
+<p>Кэширование предзапроса на 600 секунд:</p>
+
+<pre>Access-Control-Max-Age: 600 </pre>
+
+<h2 id="Спецификации">Спецификации</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th scope="col">Спецификация</th>
+ <th scope="col">Статус</th>
+ <th scope="col">Комментарий</th>
+ </tr>
+ <tr>
+ <td>{{SpecName('Fetch','#http-access-control-max-age', 'Access-Control-Max-Age')}}</td>
+ <td>{{Spec2("Fetch")}}</td>
+ <td>Начальное определение.</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Совместимость_в_браузерах">Совместимость в браузерах</h2>
+
+<p class="hidden">The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out <a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> and send us a pull request.</p>
+
+<p>{{Compat("http.headers.Access-Control-Max-Age")}}</p>
+
+<h2 id="Смотрите_также">Смотрите также</h2>
+
+<ul>
+ <li>{{HTTPHeader("Access-Control-Allow-Headers")}}</li>
+ <li>{{HTTPHeader("Access-Control-Allow-Methods")}}</li>
+</ul>