But window.location.href.replace handles "different" URLs too! And https:// <==> wss:// !