Looking to Build/Redesign a Website or Blog ?

To speak to Rakshit, call +91 968 704 2303

Auto Refresh WebPage after few seconds Using Javascript

Hello Friends,

Do you want to refresh your webpage after few second automatically? I need to auto refresh my web page after every 5 seconds 10 seconds or 1 minute. We can do this with javascript or with meta tag of Html. Auto load the web page after every 10 seconds or 30 seconds using below code. which is help you lots.

 

Using HTML Meta Tag:

Meta-HTML tag,The element provides meta-information about your page. You can include this tag in between tag.

Refresh Page after every 10 seconds.
<meta http-equiv=”refresh” content=”10; URL=http://www.programmingfacts.com”>

Using Javascript:

You can also do this by using javascript setTimeout function. Just call this function in onLoad event of body tag.

Specify timeperiod in milliseconds. So if you want to refresh web page after every 5 second than timeperiod will be 5000.
<body onload=”javascript:setTimeout(“location.reload(true);”,timeperiod);”>

Thats it.

I hope this may be helpful. Let me know if you find any problem.

Thank You

Share:

11 Comments

  • Kakraul

    How do I place the tag in the html body of a website.
    I want to see a page online to be refreshed every 10 seconds for instance. Now I would not be able to make changes to the html tags, would I?
    in the case of using java Script, where do I place that?
    I really appreciate it if you can help me out, even better if you explain it with a sample, or refer me to another website, to understand that better.
    Thank you.

  • Auto Exporting…

    […]Auto Refresh Page after every seconds Using Javascript, Auto Refresh Page Using HTML Meta Tag | Programming Facts -PHP Freelancer-Indian Freelancer[…]…

  • relevant keywords…

    […]Auto Refresh Page after every seconds Using Javascript, Auto Refresh Page Using HTML Meta Tag | Programming Facts -PHP Freelancer-Indian Freelancer[…]…

  • Multimedia Online Store…

    […]Auto Refresh Page after every seconds Using Javascript, Auto Refresh Page Using HTML Meta Tag | Programming Facts -PHP Freelancer-Indian Freelancer[…]…

  • developer…

    […]Auto Refresh Page after every seconds Using Javascript, Auto Refresh Page Using HTML Meta Tag | Programming Facts -PHP Freelancer-Indian Freelancer[…]…

Leave a Reply

Your email address will not be published.