Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>This <a href="http://edn.embarcadero.com/article/38123" rel="nofollow noreferrer">blog post</a> helped me a lot in order to tame the "conditional get" beast. </p> <p>An interesting excerpt (which partially contradicts Ben's answer) states that:</p> <blockquote> <p>If a normal response would have included an ETag header, that header must also be included in the 304 response.</p> <p>Cache headers (Expires, Cache-Control, and/or Vary), if their values might differ from those sent in a previous response.</p> </blockquote> <p><strong>This is in complete accordance with the <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.3.5" rel="nofollow noreferrer">RFC 2616 sec 10.3.5</a>.</strong></p> <hr> <p>Below a 200 request...</p> <pre><code>HTTP/1.1 200 OK Server: nginx/0.8.52 Date: Thu, 18 Nov 2010 16:04:38 GMT Content-Type: image/png Last-Modified: Thu, 15 Oct 2009 02:04:11 GMT Expires: Thu, 31 Dec 2010 02:04:11 GMT Cache-Control: max-age=315360000 Accept-Ranges: bytes Content-Length: 6394 Via: 1.1 proxyIR.my.corporate.proxy.name:8080 (IronPort-WSA/6.3.3-015) Connection: keep-alive Proxy-Connection: keep-alive X-Junk: xxxxxxxxxxxxxxxx </code></pre> <p>...And its optimal valid 304 counterpart.</p> <pre><code>HTTP/1.1 304 Not Modified Server: nginx/0.8.52 Date: Thu, 18 Nov 2010 16:10:35 GMT Expires: Thu, 31 Dec 2011 16:10:35 GMT Cache-Control: max-age=315360000 Via: 1.1 proxyIR.my.corporate.proxy.name:8080 (IronPort-WSA/6.3.3-015) Connection: keep-alive Proxy-Connection: keep-alive X-Junk: xxxxxxxxxxx </code></pre> <p>Notice that the <code>Expires</code> header is at most <code>Current Date + One Year</code> as per <a href="https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.21" rel="nofollow noreferrer">RFC-2616 14.21</a>.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload