location.procotcolがhttpsでない場合、現在、個々のページを安全に変更しています。
if (location.protocol != "https:")
{
location.replace("https://" + window.location.host + window.location.pathname);
}
これは機能しますが、ページを離れてもプロトコルはhttpsのままであり、これをhttpにします。
ページを離れたときにトリガーされる以下を試しましたが、プロトコルとの違いはないようです
$(window).unload(function() {
location.replace("http://" + window.location.host + window.location.pathname);
});
ページを離れるときにプロトコルをhttpに変更することはできますが、残されているページからの機能を使用できますか。
ありがとう