Tag: https
实现JS ASP NET PHP JAVA语言获取判断http与htpps协议头方法
本文博主收集了JS ASP NET PHP JAVA各种语言实现获取url是http还是https协议的方法代码,直接进入正题。
Javascript代码方法:
var ishttps = 'https:' == document.location.protocol ? true: false;
if(ishttps){
alert("这是个https请求");
}else{
alert(“这是个http请求”);
}
ASP代码方法:
<%
Response.Buffer = True
If ... [阅读全文]