fyi doing http:// will break some functionality, window.protocol would prolly be safer.