]> git.openstreetmap.org Git - rails.git/commitdiff
Merge branch 'pull/5678'
authorAnton Khorev <tony29@yandex.ru>
Sat, 15 Feb 2025 17:03:42 +0000 (20:03 +0300)
committerAnton Khorev <tony29@yandex.ru>
Sat, 15 Feb 2025 17:03:42 +0000 (20:03 +0300)
app/assets/javascripts/index.js

index b6ead9f2d988eea2e391cd1d9689120a90a9f14e..a5916d3ed13682be79bc664840aa9529caf9f9f9 100644 (file)
@@ -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();