using javascript to get previous page url code example Example: get previous url javascript document.referrer