I have the following url modification script
var path = window.location.href
path=path.replace(/&/g, "&");
window.location.href=path;
The page keeps reloading…
What should I do to make the page reload only once?
I have the following url modification script
var path = window.location.href
path=path.replace(/&/g, "&");
window.location.href=path;
The page keeps reloading…
What should I do to make the page reload only once?
2
Answers
where did you add window.location.href = path ? directly in the script element of the page ? if so, of course it should reload, as the navigator executes the script code each time it loads.
Anyways, you need to upload the whole code, so we can help you.
You should modify your script so
window.location.href=path;
is only called if&
is detectedsomething like: