http-referer

In what cases will HTTP_REFERER be empty

假装没事ソ 提交于 2019-11-26 00:05:59
问题 I know it\'s possible to get an empty HTTP_REFERER. Under what circumstances does this happen? If I get an empty one, does it always mean that the user changed it? Is getting an empty one the same as getting a null one? and under what circumstances do I get that too? 回答1: It will/may be empty when the enduser entered the site URL in browser address bar itself. visited the site by a browser-maintained bookmark. visited the site as first page in the window/tab. clicked a link in an external

Determining Referer in PHP

泪湿孤枕 提交于 2019-11-25 23:02:59
问题 What is the most reliable and secure way to determine what page either sent, or called (via AJAX), the current page. I don\'t want to use the $_SERVER[\'HTTP_REFERER\'] , because of the (lack of) reliability, and I need the page being called to only come from requests originating on my site. Edit: I am looking to verify that a script that preforms a series of actions is being called from a page on my website. 回答1: The REFERER is sent by the client's browser as part of the HTTP protocol, and

How reliable is HTTP_REFERER?

瘦欲@ 提交于 2019-11-25 21:57:12
问题 I need to check and record the referrer of visitors to my web application. How reliable is using HTTP_REFERER ? And are there other alternatives? 回答1: Using HTTP_REFERER isn't reliable, it's value is dependent on the HTTP Referer header sent by the browser or client application to the server and therefore can't be trusted. Regarding the Referer header, section 15.1.2 of RFC2616 states: Therefore, applications SHOULD supply as much control over this information as possible to the provider of

Getting the HTTP Referrer in ASP.NET

时光总嘲笑我的痴心妄想 提交于 2019-11-25 19:29:41
I'm looking for a quick, easy and reliable way of getting the browser's HTTP Referrer in ASP.Net ( C# ). I know the HTTP Referrer itself is unreliable, but I do want a reliable way of getting the referrer if it is present. You could use the UrlReferrer property of the current request: Request.UrlReferrer This will read the Referer HTTP header from the request which may or may not be supplied by the client (user agent). Dismissile Use the Request.UrlReferrer property. Underneath the scenes it is just checking the ServerVariables("HTTP_REFERER") property. Request.Headers["Referer"] Explanation