HTTP_REFERRER
Ver originalif(document.referrer) history.back(); // Volvemos atráselse document.location.href = "/"; // Redirigimos al index