aboutsummaryrefslogtreecommitdiff
path: root/files/pt-br/web/http/headers/access-control-max-age
diff options
context:
space:
mode:
authorPeter Bengtsson <mail@peterbe.com>2020-12-08 14:42:52 -0500
committerPeter Bengtsson <mail@peterbe.com>2020-12-08 14:42:52 -0500
commit074785cea106179cb3305637055ab0a009ca74f2 (patch)
treee6ae371cccd642aa2b67f39752a2cdf1fd4eb040 /files/pt-br/web/http/headers/access-control-max-age
parentda78a9e329e272dedb2400b79a3bdeebff387d47 (diff)
downloadtranslated-content-074785cea106179cb3305637055ab0a009ca74f2.tar.gz
translated-content-074785cea106179cb3305637055ab0a009ca74f2.tar.bz2
translated-content-074785cea106179cb3305637055ab0a009ca74f2.zip
initial commit
Diffstat (limited to 'files/pt-br/web/http/headers/access-control-max-age')
-rw-r--r--files/pt-br/web/http/headers/access-control-max-age/index.html82
1 files changed, 82 insertions, 0 deletions
diff --git a/files/pt-br/web/http/headers/access-control-max-age/index.html b/files/pt-br/web/http/headers/access-control-max-age/index.html
new file mode 100644
index 0000000000..d2682eb848
--- /dev/null
+++ b/files/pt-br/web/http/headers/access-control-max-age/index.html
@@ -0,0 +1,82 @@
+---
+title: Access-Control-Max-Age
+slug: Web/HTTP/Headers/Access-Control-Max-Age
+tags:
+ - CORS
+ - Cabeçalho de Resposta
+ - Cache
+ - HTTP
+ - Reference
+ - Referencia
+ - cabeçalho
+translation_of: Web/HTTP/Headers/Access-Control-Max-Age
+---
+<div>{{HTTPSidebar}}</div>
+
+<p>O cabeçalho de resposta <strong><code>Access-Control-Max-Age</code></strong> indica por quanto tempo os resultados de uma {{glossary("preflight request")}} (que é a informação contida nos cabeçalhos {{HTTPHeader("Access-Control-Allow-Methods")}} e {{HTTPHeader("Access-Control-Allow-Headers")}}) pode ser cacheada (mantida).</p>
+
+<table class="properties">
+ <tbody>
+ <tr>
+ <th scope="row">Tipo de cabeçalho</th>
+ <td>{{Glossary("Response header")}}</td>
+ </tr>
+ <tr>
+ <th scope="row">{{Glossary("Forbidden header name")}}</th>
+ <td>não</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Sintaxe">Sintaxe</h2>
+
+<pre class="syntaxbox">Access-Control-Max-Age: &lt;delta-segundos&gt;
+</pre>
+
+<h2 id="Diretivas">Diretivas</h2>
+
+<dl>
+ <dt>&lt;delta-segundos&gt;</dt>
+ <dd>Número máximo de segundos que os resultados podem ser cacheados.<br>
+ Firefox <a href="https://dxr.mozilla.org/mozilla-central/rev/7ae377917236b7e6111146aa9fb4c073c0efc7f4/netwerk/protocol/http/nsCORSListenerProxy.cpp#1131">limita isso em 24 horas</a> (86400 segundos).<br>
+ Chromium (anterior à v76) <a href="https://cs.chromium.org/chromium/src/services/network/public/cpp/cors/preflight_result.cc?l=36&amp;rcl=52002151773d8cd9ffc5f557cd7cc880fddcae3e">limita isso à 10 minutos</a> (600 segundos).<br>
+ Chromium (começando na v76) <a href="https://cs.chromium.org/chromium/src/services/network/public/cpp/cors/preflight_result.cc?l=31&amp;rcl=49e7c0b4886cac1f3d09dc046bd528c9c811a0fa">limita isso à 2 horas</a> (7200 segundos).<br>
+ Chromium também especifica o valor padrão de 5 segundos.<br>
+ O valor de <strong>-1</strong> irá desabilitar o cacheamento, requerendo uma requisição de checagem pré-vôo OPTIONS para todas as chamadas.</dd>
+</dl>
+
+<h2 id="Exemplos">Exemplos</h2>
+
+<p>Resultados cacheados para uma requisição pré-vôo por 10 minutos:</p>
+
+<pre>Access-Control-Max-Age: 600 </pre>
+
+<h2 id="Especificações">Especificações</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th scope="col">Especificação</th>
+ <th scope="col">Status</th>
+ <th scope="col">Comentários</th>
+ </tr>
+ <tr>
+ <td>{{SpecName('Fetch','#http-access-control-max-age', 'Access-Control-Max-Age')}}</td>
+ <td>{{Spec2("Fetch")}}</td>
+ <td>Initial definition.</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Compatibilidade_de_navegador">Compatibilidade de navegador</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="Veja_também">Veja também</h2>
+
+<ul>
+ <li>{{HTTPHeader("Access-Control-Allow-Headers")}}</li>
+ <li>{{HTTPHeader("Access-Control-Allow-Methods")}}</li>
+</ul>