Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what does UrlReferrer exactly mean?

what does UrlReferrer(Request.UrlReferrer & Request.UrlReferrer.OriginalString) exactly mean?
i wrote these codes :

    if (Request.UrlReferrer != null)
    {
        User_Info.Add(!string.IsNullOrEmpty(Request.UrlReferrer.OriginalString) ? Request.UrlReferrer.OriginalString : string.Empty);//6:UrlReferrer
    }
    else
    {
        User_Info.Add(string.Empty);
    }

i just know ReturnUrl querystring when a user tries to login to admin area.
so in web.config <authentication mode="Forms">
and now we have UrlReferrer server-side code.
i want to gather some information about my users of my web site such as User-Agent , User-Browser , Session-ID , etc...
but i really do n't know what does UrlReferrer exactly do and it is always null.(i think because of wrong usage)
would you please give me a simple example for understanding.

thanks for attention

like image 931
SilverLight Avatar asked May 28 '12 08:05

SilverLight


1 Answers

quote:

When visiting a webpage, the referrer or referring page is the URL of the previous webpage from which a link was followed.

for more information you can go to http://en.wikipedia.org/wiki/HTTP_referer

It can be null if you someone opened a browser and just entered your site address (without pressing a link to get there)

like image 153
eyossi Avatar answered Nov 15 '22 07:11

eyossi