I want to replace a URL with another while loading. I have written the code below.
<script type="text/javascript">
var executed = false;
if (!executed) {
executed = true;
window.location.href = window.location.pathname + '?'+'bc';
}
</script>
But it's not working correctly. It's loading again and again. It doesn't stop.
window.historystates instead: spoiledmilk.com/blog/…