Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>(hey, everyone: please don't just mindlessly copy&amp;paste all headers you can find)</p> <p>First of all, <a href="http://httpwg.org/specs/rfc7234.html#history.lists" rel="noreferrer">Back button history is <em>not a cache</em></a>:</p> <blockquote> <p>The freshness model (Section 4.2) does not necessarily apply to history mechanisms. That is, a history mechanism can display a previous representation even if it has expired.</p> </blockquote> <p>In the old HTTP spec the wording was even stronger, explicitly telling browsers to disregard cache directives for back button history.</p> <p>Back is supposed to go back in time (to the time when the user <em>was</em> logged in). It does not navigate forward to a previously opened URL.</p> <p>However, in practice, the cache can influence the back button, in very specific circumstances:</p> <ul> <li>Page <em>must</em> be delivered over <strong>HTTPS</strong>, otherwise this cache-busting won't be reliable. Plus, if you're not using HTTPS, then your page is vulnerable to login stealing in many other ways.</li> <li>You must send <code>Cache-Control: no-store, must-revalidate</code> (some browsers observe <code>no-store</code> and some observe <code>must-revalidate</code>)</li> </ul> <p>You <em>never</em> need any of:</p> <ul> <li><code>&lt;meta&gt;</code> with cache headers — it doesn't work at all. Totally useless.</li> <li><code>post-check</code>/<code>pre-check</code> — it's IE-only directive that only applies to <em>cachable</em> resources.</li> <li>Sending same header twice or in dozen parts. Some PHP snippets out there actually replace previous headers, resulting in only last one being sent.</li> </ul> <p>If you want, you could add:</p> <ul> <li><code>no-cache</code> or <code>max-age=0</code>, which will make resource (URL) "stale" and require browsers to check with the server if there's a newer version (<code>no-store</code> already implies this even stronger).</li> <li><code>Expires</code> with a date in the past for HTTP/1.0 clients (although <em>real</em> HTTP/1.0-only clients are completely non-existent these days).</li> </ul> <hr> <p>Bonus: <a href="http://httpwg.org/specs/rfc7234.html" rel="noreferrer">The new HTTP caching RFC</a>.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

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