我使用下面这段代码跳转https,从这个页面跳转其他的http绝对地址页面,其他页面也会跳转成https,是代码的问题吗。想要跳转的那个页面不使用https,
用的来客客服系统,使用https访问的话,不管是客户端还是客服,都要刷新一下页面才能显示出来新消息。https能指定页面跳转吗,或者指定页面不跳转。
<script type="text/javascript">
var targetProtocol = "https:";
if (window.location.protocol != targetProtocol)
window.location.href = targetProtocol +
window.location.href.substring(window.location.protocol.length);
</script>