how to make a page aut redirect after 5 seconds

Posted on 2005-04-06
Last Modified: 2008-01-09
Hi every one . Probably an easy question here. I need to have a page auto redirect to another url after 5 secodns what is the script for that
Thaks Shayne
Question by:shayne23d
    LVL 12

    Assisted Solution

    here's a simple sample:

    This page will redirect in 5 seconds.
    self.setTimeout("window.location=''", 5000);
    LVL 23

    Accepted Solution

    <body onLoad="setTimeout('window.location=\'\'', 5000)">
    LVL 5

    Expert Comment

    LVL 13

    Expert Comment

    i think frrf's solution is better

    because, in others javascript maybe disabled on the browser:)
    LVL 5

    Expert Comment


    i don't want to be rude here
    but i want to mention that META refresh can also be disabled from the security settings of IE.
    I don't know of other browsers.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    6 Surprising Benefits of Threat Intelligence

    All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

    I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
    I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:  The Exchange of information …
    In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now