Referrer URL with jQuery or Javascript – Cache & Referrer URL Issue
I don’t have the answer build on cookie, but I think this isn’t sensitive data, you can try localStorage. jQuery(document).ready(function($){ var initreferrer = document.referrer; if(initreferrer.indexOf(‘yourdomain.com’) === -1 ) { // Check if the referer is your site or not. If not( return -1 ) set the localStorage. localStorage.setItem(“mysite_referrer”, initreferrer); } }); Then you can use … Read more