javascript: window.location.href = document.referrer PHP: header('Location: '.$_SERVER['HTTP_REFERER']);