I am looking for a Jquery variable that identifies the source url from which a page has been opened. The aim is to do a code like this: If you access page A from page B, then… / If you access page A from page C, then…
(note: I don't use php)
Thanks,
I am looking for a Jquery variable that identifies the source url from which a page has been opened. The aim is to do a code like this: If you access page A from page B, then… / If you access page A from page C, then…
(note: I don't use php)
Thanks,
 
    
    With window.location.href; you get the full URL (https://test.com/itm/012458.html)
With window.location.origin; you get the base URL  https://test.com
And with window.location.pathname; the path only (/itm/012458.html)
Sorry, I think I misunderstand you. 
You need as another user wrote: var x = document.referrer; 
