Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get HTTP-Referer via JS | Jquery?

Tags:

Is it possible to get the http-referer of visitors via pure JS or with JQuery?

like image 563
Za Noza Avatar asked Nov 03 '14 14:11

Za Noza


People also ask

How do I get referer in Javascript?

However, since you can use javascript on website2, you could get the referrer ( document. referrer ) and add it to the url of the pixel you get. For example: var referer = document.

How do I find HTTP referer?

To check the Referer in action go to Inspect Element -> Network check the request header for Referer like below. Referer header is highlighted. Supported Browsers: The browsers are compatible with HTTP header Referer are listed below: Google Chrome.

What is referrer in Javascript?

The referrer property returns the URL of the document that loaded the current document. The referrer property is read-only.

Can you fake HTTP referer?

Yes. The HTTP_REFERER is data passed by the client. Any data passed by the client can be spoofed/forged.


1 Answers

Yes. Just use document.referrer.

like image 53
Scimonster Avatar answered Sep 30 '22 16:09

Scimonster