diff --git a/static/skin/index.js b/static/skin/index.js index 8f5ed557..2b5a4149 100644 --- a/static/skin/index.js +++ b/static/skin/index.js @@ -429,7 +429,11 @@ filter.addEventListener('change', () => {resetAndFilter(filter.name, filter.value)}); }); if (filters) { - window.history.pushState({}, null, `?${params.toString()}`); + const currentLink = window.location.search; + const newLink = `?${params.toString()}`; + if (currentLink != newLink) { + window.history.pushState({}, null, newLink); + } } updateVisibleParams(); document.getElementById('kiwixSearchForm').onsubmit = (event) => {event.preventDefault()}; diff --git a/test/server.cpp b/test/server.cpp index 12909fe6..992ffb9c 100644 --- a/test/server.cpp +++ b/test/server.cpp @@ -184,7 +184,7 @@ R"EXPECTEDRESULT( src="/ROOT/skin/jquery-ui/external/jquery/jquery.js?cache src: url("/ROOT/skin/fonts/Roboto.ttf?cacheid=84d10248") format("truetype"); - + )EXPECTEDRESULT" }, {