/
Vary.xml
57 lines (51 loc) · 2.94 KB
/
Vary.xml
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
<!DOCTYPE html>
<html lang="en" dir="ltr" xmlns="http://www.w3.org/1999/xhtml" xmlns:w="tag:fullstack.wiki,2018:ns/">
<head>
<meta charset="UTF-8" />
<title>Vary</title>
<meta name="description" content="Describes what parts of a request message might influence the origin server's process for selecting and representing this response" />
<link rel="up" href="index.xml" />
</head>
<body>
<main about="tag:fullstack.wiki,2018:ns/http/headers/Vary" typeof="w:HTTP-Header">
<a rel="http://www.w3.org/1999/xhtml/vocab#describedby" href="" />
<h1>Vary</h1>
<p>The "Vary" header field in a response describes what parts of a request message might influence the origin server's process for selecting and representing this response.</p>
<h2>Writing responses (servers)</h2>
<p>List all headers that affect the contents of the response message body. These headers include:</p>
<ul>
<!-- Not all headers that are negotiated will be listed in Vary; in particular, Connection headers are not listed in Vary -->
<!-- <li subquery="each" about-bind="{?abt}" property="w:HTTP-Header-negotiates" resource-bind="{?header}"><a property="xht:describedby" href-bind="{?headerabt}">{?headerabt}</a></li> -->
<li><a href="Accept.xml">Accept</a></li>
<li><a href="Accept-Charset.xml">Accept-Charset</a></li>
<li><a href="Accept-Encoding.xml">Accept-Encoding</a></li>
<li><a href="Accept-Language.xml">Accept-Language</a></li>
<li><a href="Cookie.xml">Cookie</a></li>
</ul>
<p>Remember to include headers that weren't in the request, but would have affected the response if they were.</p>
<p>Do not include connection headers that negotiate protocol details (such as <code>TE</code>). These will be listed by the client in the <a href="Connection.xml">Connection header</a>.</p>
<h2>Reading responses (clients)</h2>
<p>The Vary header is used for computing caching keys, see caching instructions for more information.</p>
<!-- TODO: link to page on computing caching keys -->
<h2>Overview table</h2>
<dl class="inline">
<dt>Name</dt>
<dd property="w:HTTP-Header-name">Vary</dd>
<dt>Description</dt>
<dd property="w:HTTP-Header-description">Lists headers that affect the response.</dd>
<dt>Direction</dt>
<dd property="w:HTTP-Header-direction">Response</dd>
<dt>Specification</dt>
<dd property="w:specification"><a href="https://www.rfc-editor.org/rfc/rfc9110#name-vary">RFC 9110: HTTP Semantics §13.1. Vary</a></dd>
</dl>
<h2>Syntax</h2>
<pre type="abnf">Vary = "*" / 1#field-name</pre>
<h2>History</h2>
<ol>
<li>1999-06: <a href="https://www.rfc-editor.org/rfc/rfc2616.html#section-14.44">RFC 2616 §14.44. Vary</a></li>
<li>2014-06: <a href="https://httpwg.org/specs/rfc7231.html#header.vary">RFC 7231 §7.1.4. Vary</a></li>
<li>2022-06: <a href="https://www.rfc-editor.org/rfc/rfc9110#name-vary">RFC 9110 §12.5.5. Vary</a></li>
</ol>
</main>
</body>
</html>