How? Redirect after 5 seconds on page?

by nikson
3 replies
  • WEB DESIGN
  • |
Hi,

i'm wondering whit code chould I use for this? I want people to come to my site and see the offer and 'clock' "you will be redirected after 5 seconds" or something similar?

Thanks for helping!
#page #redirect #seconds
  • Profile picture of the author Karen Blundell
    add this bit of code in between you <head> </head> tags in your HTML:

    Code:
    
    <meta http-equiv="refresh" content="5;url=http://www.thedomainyouwanttoredirectto.com/">
    Signature
    ---------------
    {{ DiscussionBoard.errors[3488457].message }}
  • Profile picture of the author nikson
    Thank you Karen!

    If there any 'simple' way to have a clock ticking away to end of redirect time? You know "You will be redirect in 5, 4, 3, 2, 1,..."


    But 'static' option will do the trick for me also :-)
    {{ DiscussionBoard.errors[3488800].message }}
    • Profile picture of the author RyanAndrews
      A javascript setInterval can do this.
      Decrement a counter, and display your message by changing the innerHTML of say, a div, then when it gets to zero, change the document.location.href and the user will be redirected.
      {{ DiscussionBoard.errors[3489514].message }}

Trending Topics