You must Sign In to post a response.
  • Category: HTML

    Autirefresh particular html page

    Hi,

    I want to autoreferesh my html page for every 1 minute.

    For example if i have 10 html pages and if i write lines of code for auto referesh in html page 2 , auto refresh should happen for html page 2 only for every 1 minute , should not get refresh for all other pages.

    And whenever i visit html page 2 then auto refreh should work for that oage only , if i visit other html pages auto refresh should not work.


    Regards,
    Ayesha
  • #769974
    Hi

    you can use this code for refresh html page


    <head>
    <meta http-equiv="refresh" content="30">
    </head>

    Name : Dotnet Developer-2015
    Email Id : kumaraspcode2009@gmail.com

    'Not by might nor by power, but by my Spirit,' says the LORD Almighty.

  • #770385
    There are couple ways to refresh HTML page

    1. Place this inside <head> to refresh page after 60 seconds:

    <meta http-equiv="refresh" content="60"> <!-- Refresh every 1 minute -->

    2. Write a javascript function to refresh the page for every 1 min and call or assign that function for page window onload as like below using setTimeout

    function beginrefresh(){
    if (!document.images)
    return
    if (parselimit == 1)
    window.location.reload()
    else{
    parselimit -= 1
    curmin = Math.floor(parselimit/60)
    cursec = parselimit%60
    if (curmin!=0)
    curtime = curmin+" minutes and "+cursec+" seconds left until page refresh!"
    else
    curtime = cursec+" seconds left until page refresh!"
    window.status = curtime
    setTimeout("beginrefresh()",200)
    }
    }

    window.onload = beginrefresh

    Thanks!
    B.Ramana Reddy


  • Sign In to post your comments