现在的位置: 首页 > 综合 > 正文

HttpContext.Current.Request.UrlReferrer说明

2013年10月21日 ⁄ 综合 ⁄ 共 790字 ⁄ 字号 评论关闭
The situations where this ServerVariable works include the following methods of a browser loading a URL: 
  • clicking on a straight HTML <a href> link;
  • submitting a form, using POST or GET, from a submit button, <input type=image> or client-side script (form.submit())

The situations where it doesn't work:

  • clicking on a Favorite, History, or the recently-typed URLs list;
  • clicking on 'Home' in IE's toolbar, or an item in IE's 'Links' toolbar;
  • using location.href or location.replace() in client-side JScript/JavaScript/VBScript;
  • using HierMenus (details);
  • typing the URL directly in the browser and hitting Enter or clicking 'Go';
  • launching a clickable URL from an e-mail or MS Office document;
  • using Response.Redirect / Server.Transfer;
  • using Response.AddHeader (302) or <meta http-equiv=refresh> to redirect;
  • loading the URL with XML (see Article #2173);
  • misspelling the variable name (many people assume HTTP_REFERRER).

抱歉!评论已关闭.