Prevent caching a partial XHR response as a full page URL

Fixes #5663
This commit is contained in:
Tom Hughes 2025-02-15 15:05:00 +00:00
parent 8ecbe9b07d
commit b1397d9fc3

View 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();