国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 學院 > 開發設計 > 正文

HTTP_REFERER的工作方式

2019-11-18 19:15:28
字體:
來源:轉載
供稿:網友

下列情況是從瀏覽器的地址欄正常取得Request.ServerVariables("HTTP_REFERER")的:
1.直接用<a href>
2.用Submit或<input type=image>提交的表單(POST or GET)
3.使用Jscript提交的表單(POST or GET)

下面我們再看看Request.ServerVariables("HTTP_REFERER")不能正常取值的情況:
1.從收藏夾鏈接
2.單擊'主頁'或者自定義的地址
3.利用Jscript的location.href or location.replace()
4.在瀏覽器直接輸入地址
5.<%Response.Redirect%>
6.<%Response.AddHeader%>或<meta http-equiv=refresh>轉向
7.用xml加載地址

顯然,Request.ServerVariables("HTTP_REFERER")在多數情況下是不能正常工作的,下面我們看一個例子:
ref.asp
<%
response.write "You came from: " & request.servervariables("http_referer")
%>

ref.htm
<%
Response.AddHeader "Refresh", "10;URL=ref.asp"
%> 

<meta http-equiv='refresh' content='10;URL=ref.asp'> 

<form method=GET action=ref.asp name=getform> 
<input type=submit value=' Go there (GET) >> '> 
<input type=image style='cursor:hand'> 
</form><p> 
看看上面的代碼會得到什么的結果.
<form method=POST action=ref.asp name=postform> 
<input type=submit value=' Go there (POST) >> '> 
<input type=image style='cursor:hand'> 
</form><p> 

<a href='ref.asp'>直接鏈接<p> 

<a href='#' onclick='window.location.href="ref.asp";return false;'>javascript location</a> 

<a href='#'onclick='window.location.replace("ref.asp");return false;'>Javascript replace</a> 

<a href='#' onclick='document.getform.submit();return false;'>javascript GET</a> 

<a href='#' onclick='document.postform.submit();return false;'>javascript POST </a>


發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 武宣县| 永年县| 太仓市| 建宁县| 玛沁县| 朝阳市| 太和县| 武夷山市| 桦甸市| 嵩明县| 手游| 怀来县| 北京市| 麻江县| 广元市| 山东省| 福州市| 夏河县| 株洲县| 靖宇县| 镇平县| 泊头市| 兴海县| 九台市| 桦川县| 青川县| 张掖市| 西藏| 黑山县| 新巴尔虎左旗| 马边| 泸州市| 阜阳市| 卢湾区| 三穗县| 房产| 繁峙县| 即墨市| 湖州市| 政和县| 鹤壁市|