Is there any way to get the previous URL in JavaScript? Something like this:
alert(\"previous url is: \" + window.history.previous.href);
This will navigate to the previously visited URL.
javascript:history.go(-1)