JavaScript : Time delayed page redirect.
Recently in one of the project I am working on required me to do a “JavaScript” based url redirect. Originally I used a PHP header based 301 redirect
1 2 3 4 |
<? header("HTTP/1.1 301 Moved Permanently"); header("Location: http://www.google.com "); ?> |
But this approach has one limitation.The limitation is that you can not send any data before the header. My client used third-party JavaScript based tracking service