<p>Conducting a simple refresh (f5) on a recently downloaded <a href="https://www.openstreetmap.org/way/17236956" rel="nofollow">test map page</a> causes only half (10 out of 21) of the files to give a <code>304 Not Modified</code>. That is obviously <em>Not Good</em> both for the user (slow) plus OSM (increased bandwidth + load). There is no single reason for that cache-miss, so I will raise a separate issue for each file-type.</p>
<p>There <em>is</em> an across-the-board issue that affects almost all website files: almost no files contain a <code>Last-Modified</code> Response Header, in spite of the RFC advice + current best-practice from Apache.</p>
<p><a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec13.html#sec13.3.4" rel="nofollow">Section 13.3.4 of the HTTP/1.1 rfc2616</a> advises the following:</p>
<blockquote>
<p><em><strong>13.3.4 Rules for When to Use Entity Tags and Last-Modified Dates</strong></em><br>
…<br>
In other words, the preferred behavior for an HTTP/1.1 origin server is to send both a strong entity tag and a Last-Modified value.<br>
…<br>
HTTP/1.0 clients and caches will ignore entity tags. Generally, last-modified values received or used by these systems will support transparent and efficient caching, and so HTTP/1.1 origin servers should provide Last-Modified values. In those rare cases where the use of a Last-Modified value as a validator by an HTTP/1.0 system could result in a serious problem, then HTTP/1.1 origin servers should not provide one.</p>
</blockquote>
<p>Although RFC2616 has been updated, I am unaware of any change to the above advice.</p>
<p>The only downside that I am aware of is when dealing with a HTTP/1.0 Proxy which may respond to a <code>Last-Modified</code> which conflicts with the <code>Etag</code>. I suspect that that is rarer than hen's teeth. Nevertheless, above is the relevant advice.</p>
<p>I've seen that up to at least <a href="https://github.com/openstreetmap/openstreetmap-website/commit/2d5df687fcbf2564e2f199535aed04f67953bd0e">29 Jul 2013</a> that files <em>were</em> supplied with a <code>Last-Modified</code> header. I could not find any reason why that was removed and the fact that Apache always provides both for files directly under it's control convinces. I'm a belt 'n' braces kind of man myself & it seems to me that providing a <code>Last-Modified</code> still fits with "Do no harm".</p>
<p>Please also look at this <a href="https://www.openstreetmap.org/user/alexkemp/diary/368814" rel="nofollow">Diary page</a> for fuller comments.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/issues/2260?email_source=notifications&email_token=AAK2OLIXYUTBLRSLWXEFOPTP2ZXW3A5CNFSM4HYRTLRKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4GZYDQXQ">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLOLO73QZOG74XDNAGLP2ZXW3ANCNFSM4HYRTLRA">mute the thread</a>.<img src="https://github.com/notifications/beacon/AAK2OLKO335G5NYDWTIOC2LP2ZXW3A5CNFSM4HYRTLRKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4GZYDQXQ.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/issues/2260?email_source=notifications\u0026email_token=AAK2OLIXYUTBLRSLWXEFOPTP2ZXW3A5CNFSM4HYRTLRKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4GZYDQXQ",
"url": "https://github.com/openstreetmap/openstreetmap-website/issues/2260?email_source=notifications\u0026email_token=AAK2OLIXYUTBLRSLWXEFOPTP2ZXW3A5CNFSM4HYRTLRKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4GZYDQXQ",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>