jabber
answered Apr 14 '22 00:00
window.history.back() will redirect to the previous URL so you cant print it
window.history.go(-1) will redirect to the previous URL so you cant print it
document.referrer will give you the site page where you come at this page
console.log(document.referrer)
will print the previous url . but it prints empty if no previous url.