1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
|
---
title: If-Unmodified-Since
slug: Web/HTTP/Headers/If-Unmodified-Since
translation_of: Web/HTTP/Headers/If-Unmodified-Since
---
<div>{{HTTPSidebar}}</div>
<p>A requisição <strong><code>If-Unmodified-Since</code></strong> do cabeçalho HTTP realiza uma requisição condicional: o servidor enviará de volta o recurso solicitado ou o aceitará no caso de um {{HTTPMethod("POST")}} ou non-{{Glossary("safe")}} método, somente se não tiver sido modificado pela última vez após a data especificada. Se a solicitação tiver sido modificada após a data já especificada, a resposta será um erro {{HTTPStatus("412")}} (Precondition Failed).</p>
<p>A requisição</p>
<p>There are two common use cases:</p>
<ul>
<li>In conjunction with non-{{Glossary("safe")}} methods, like {{HTTPMethod("POST")}}, it can be used to implement an <a href="https://en.wikipedia.org/wiki/Optimistic_concurrency_control">optimistic concurrency control</a>, like done by some wikis: editions are rejected if the stored document has been modified since the original has been retrieved.</li>
<li>In conjunction with a range request with a {{HTTPHeader("If-Range")}} header, it can be used to ensure that the new fragment requested comes from an unmodified document.</li>
</ul>
<table class="properties">
<tbody>
<tr>
<th scope="row">Header type</th>
<td>{{Glossary("Request header")}}</td>
</tr>
<tr>
<th scope="row">{{Glossary("Forbidden header name")}}</th>
<td>no</td>
</tr>
</tbody>
</table>
<h2 id="Sintaxe">Sintaxe</h2>
<pre class="syntaxbox">If-Unmodified-Since: <day-name>, <day> <month> <year> <hour>:<minute>:<second> GMT
</pre>
<h2 id="Diretivas">Diretivas</h2>
<dl>
<dt><day-name></dt>
<dd>One of "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", or "Sun" (case-sensitive).</dd>
<dt><day></dt>
<dd>2 digit day number, e.g. "04" or "23".</dd>
<dt><month></dt>
<dd>One of "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" (case sensitive).</dd>
<dt><year></dt>
<dd>4 digit year number, e.g. "1990" or "2016".</dd>
<dt><hour></dt>
<dd>2 digit hour number, e.g. "09" or "23".</dd>
<dt><minute></dt>
<dd>2 digit minute number, e.g. "04" or "59".</dd>
<dt><second></dt>
<dd>2 digit second number, e.g. "04" or "59".</dd>
<dt><code>GMT</code></dt>
<dd>
<p>Greenwich Mean Time. HTTP dates are always expressed in GMT, never in local time.</p>
</dd>
</dl>
<h2 id="Exemplos">Exemplos</h2>
<pre>If-Unmodified-Since: Wed, 21 Oct 2015 07:28:00 GMT
</pre>
<h2 id="Especificações">Especificações</h2>
<table class="standard-table">
<tbody>
<tr>
<th scope="col">Especificação</th>
<th scope="col">Título</th>
</tr>
<tr>
<td>{{RFC("7232", "If-Unmodified-Since", "3.4")}}</td>
<td>Hypertext Transfer Protocol (HTTP/1.1): Conditional Requests</td>
</tr>
</tbody>
</table>
<h2 id="Compatibilidade_com_o_Browser">Compatibilidade com o Browser</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.If-Unmodified-Since")}}</p>
<h2 id="Veja_também">Veja também</h2>
<ul>
<li>{{HTTPHeader("Last-Modified")}}</li>
<li>{{HTTPHeader("If-Modified-Since")}}</li>
<li>{{HTTPHeader("If-Match")}}</li>
<li>{{HTTPHeader("If-None-Match")}}</li>
<li>{{HTTPHeader("If-Range")}}</li>
<li>{{HTTPStatus("412")}}<code> Precondition Failed</code></li>
</ul>
|