How do i make url forwarding delay?

Discussion in 'HTML & Website Design' started by breakaway, Nov 27, 2007.

  1. #1
    I want it to take the person to a page and then 5 seconds later direct them to a different url.
     
    breakaway, Nov 27, 2007 IP
  2. EagleAmerican

    EagleAmerican Peon

    Messages:
    22
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Something like this:

    <html>
    <head>
    <script type="text/javascript">
    <!--
    function delayer(){
        window.location = "http://blah.com/blah.htm"
    }
    //-->
    </script>
    </head>
    <body onLoad="setTimeout('delayer()', 5000)">
    <p>Redirecting you in 5 seconds...</p>
    
    </body>
    </html>
    Code (markup):
     
    EagleAmerican, Nov 27, 2007 IP
    breakaway likes this.
  3. sawz

    sawz Prominent Member

    Messages:
    8,225
    Likes Received:
    808
    Best Answers:
    0
    Trophy Points:
    360
    #3
    or add this to your meta tag:
    <META http-equiv="refresh" content="5;URL=http://www.wherever.com">
    the number 5 represents the number of seconds delay.
     
    sawz, Nov 27, 2007 IP
    breakaway likes this.
  4. soulscratch

    soulscratch Well-Known Member

    Messages:
    964
    Likes Received:
    45
    Best Answers:
    0
    Trophy Points:
    155
    #4
    The JS method wouldn't work if JS was disabled, I'd go with the meta redirect.
     
    soulscratch, Nov 27, 2007 IP
  5. Stomme poes

    Stomme poes Peon

    Messages:
    3,195
    Likes Received:
    136
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Except that fcks with the user's Back button-- the second most used button on All of Teh Interwebz. I hate redirects in general, but when they steal my Back button once, I don't let them do that again (I don't go back... ).
     
    Stomme poes, Nov 28, 2007 IP
  6. breakaway

    breakaway Peon

    Messages:
    227
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    So would this work on a CMS? or do i have to manually upload a html page?
     
    breakaway, Dec 14, 2007 IP
  7. breakaway

    breakaway Peon

    Messages:
    227
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Does anybody know? Where do I put that peice of coding on?
     
    breakaway, Dec 16, 2007 IP
  8. Professional Seo

    Professional Seo Banned

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    in your
    <head>
    here
    </head>
     
    Professional Seo, Dec 16, 2007 IP
  9. trafficka

    trafficka Guest

    Messages:
    42
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    adding meta tags is better

    <META http-equiv="refresh" content="5;URL=http://www.wherever.com">
     
    trafficka, Dec 16, 2007 IP