Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

HTML page with a timer?

Explorer ,
Jun 21, 2017 Jun 21, 2017

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

905
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Jun 22, 2017 Jun 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
Engaged ,
Jun 21, 2017 Jun 21, 2017

This is probably the easiest way to achieve this.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 22, 2017 Jun 22, 2017
LATEST

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
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 21, 2017 Jun 21, 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

Nancy O'Shea— Product User, Community Expert & Moderator
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 22, 2017 Jun 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 Certified Training & Consulting
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 22, 2017 Jun 22, 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
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines