From: Anton Khorev Date: Sat, 15 Feb 2025 17:03:42 +0000 (+0300) Subject: Merge branch 'pull/5678' X-Git-Tag: live~133 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/3bdbc35bbd8f44bab813adb5c9afe505868e4a09?hp=70e1a23248922af1f6f31360d542335c67be36cf Merge branch 'pull/5678' --- diff --git a/app/assets/javascripts/index.js b/app/assets/javascripts/index.js index b6ead9f2d..a5916d3ed 100644 --- a/app/assets/javascripts/index.js +++ b/app/assets/javascripts/index.js @@ -38,6 +38,14 @@ $(document).ready(function () { $("#sidebar_loader").show().addClass("delayed-fade-in"); + // Prevent caching the XHR response as a full-page URL + // https://github.com/openstreetmap/openstreetmap-website/issues/5663 + if (content_path.indexOf("?") >= 0) { + content_path += "&xhr=1"; + } else { + content_path += "?xhr=1"; + } + $("#sidebar_content") .empty();