Skip to main content
Known Participant
June 21, 2017
Answered

HTML page with a timer?

Hi,

I am trying to make a unique html page with no navigation.  I have created a link to this page from my .index file and I want the html page to show for roughly 20 seconds and then jump back to the index page.

What is the best/easiest way to achieve this?

Thanks for your help!

Gary

    This topic is closed to new replies. Start a new post to keep the conversation going.
    mark@headTrix
    mark@headTrixCorrect answer
    Community Expert
    June 22, 2017

    Not sure if it will be unique.... this is a very old but simple method

    Paste this meta refresh tag within the <head></head> tags in your HTML document.

    Just change the seconds (I put "20" and the name of the file that you want it to refresh to (I typed in "index.html")

    <head>

    <meta http-equiv="refresh" content="20;URL='index.html'">

    </head>

    hope that helps!

    mark

    headTrix, Inc. | Adobe & AI Training & Consulting

    5 replies

    TaffyproAuthor
    Known Participant
    June 23, 2017

    I think this java script listed below is my best solution.   Any idea how to apply a fade so it doesn't jump?

    Thanks!

    <script>

        setTimeout(function(){

           window.location.href = 'index.html';

        }, 5000);

    </script>

    Translate
    mark@headTrix
    Community Expert
    mark@headTrixCommunity ExpertCorrect answer
    Community Expert
    June 22, 2017

    Not sure if it will be unique.... this is a very old but simple method

    Paste this meta refresh tag within the <head></head> tags in your HTML document.

    Just change the seconds (I put "20" and the name of the file that you want it to refresh to (I typed in "index.html")

    <head>

    <meta http-equiv="refresh" content="20;URL='index.html'">

    </head>

    hope that helps!

    mark

    Translate
    headTrix, Inc. | Adobe & AI Training & Consulting
    Nancy OShea
    Community Expert
    Community Expert
    June 22, 2017

    Unique is not always good for usability.  This could be very frustrating for some people on slower connections.

    It might be better to put everything on the same page.   See live demo below.

    Bootstrap with SVG Intro

    Translate
    Nancy O'Shea— Product User & Community Expert
    Inspiring
    June 21, 2017

    This is probably the easiest way to achieve this.

    Translate
    TaffyproAuthor
    Known Participant
    June 23, 2017

    I think this java script listed below is my best solution.   Any idea how to apply a fade so it doesn't jump?

    Thanks!

    <script>

        setTimeout(function(){

           window.location.href = 'index.html';

        }, 5000);

    </script>

    Translate