window.location = whatever is not equivalent a window.location.replace()?

Anyway since it works and doe not create any history item, this should be merged.