Can I get the referrer?

You can pass this value along: document.referrer.

That expression would need to be evaluated on website 2, not on website 3.

So:

// website2.html
<img src="https://stackoverflow.com/questions/6856697/website3.com/pxl.gif" id="pxl" />
<script>
document.getElementById('pxl').src += '?ref=" + encodeURIComponent(document.referrer);
</script>

The request to website3 will then include the referrer.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)