get the previous page url in javascript code example Example: get previous url javascript document.referrer