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

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 and he also wanted to use this service on a redirect page. ( Client demands. You deliver ). The code given below demonstrates the delayed JavaScript redirect. i.e redirect to a page after a pre specified delay in milliseconds.


Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.