<p></p>
<blockquote>
<p>javascript rather than leveraging the browser history as we do now?</p>
</blockquote>
<p>The problem is that we don't cache the results in the browser history at all, as <a class="user-mention" data-hovercard-type="user" data-hovercard-url="/users/lectrician1/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/lectrician1">@lectrician1</a> demonstrates (and as I found recently too). When you hit the back button, it makes a second overpass request.</p>
<p>Personally I think the solution is to reduce the javascript in the first place, and use more server-side stuff. I think the results caching would work better if the call to overpass was moved server-side, and the browser is just requesting page fragments from rails, rather than talking to overpass directly. That way, the html is all cached normally in the browser, since it's not dependent on any javascript re-running after hitting the back button.</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/2973#issuecomment-731733501">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLN4ETKFHBUB5IMN4DDSRDY4LANCNFSM4T6FBJPQ">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AAK2OLMNGZ4S573ZRPLXLO3SRDY4LA5CNFSM4T6FBJP2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOFOOV37I.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/2973#issuecomment-731733501",
"url": "https://github.com/openstreetmap/openstreetmap-website/issues/2973#issuecomment-731733501",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>