Those should be OK, for instance I see no reasons to do something like that: window.location.href = window.location.href;