+ Reply to Thread
Page 1 of 2
1 2 LastLast
Results 1 to 10 of 14

Thread: HTML code to refresh page every X seconds...?

  1. #1
    Learning Programmer jashsayani is an unknown quantity at this point jashsayani's Avatar
    Join Date
    Jun 2008
    Posts
    38

    HTML code to refresh page every X seconds...?

    Hi,

    I want to make a HTML page that refreshes every X seconds. Like 10 secs/20 secs.

    How do I make it refresh on its own....?


    Thanks.

  2. #2
    Super Moderator WingedPanther has much to be proud of WingedPanther has much to be proud of WingedPanther has much to be proud of WingedPanther has much to be proud of WingedPanther has much to be proud of WingedPanther has much to be proud of WingedPanther has much to be proud of WingedPanther has much to be proud of WingedPanther has much to be proud of WingedPanther's Avatar
    Join Date
    Jul 2006
    Age
    36
    Posts
    11,680
    Blog Entries
    57

    Re: HTML code to refresh page every X seconds...?

    You have to use JavaScript to make the page refresh.
    CodeCall Blog | CodeCall Wiki | Shareware
    Programming is a branch of mathematics.
    My CodeCall Blog | My Personal Blog

  3. #3
    Programming Professional nullbyte will become famous soon enough nullbyte will become famous soon enough nullbyte's Avatar
    Join Date
    Oct 2007
    Location
    ~
    Age
    16
    Posts
    300

    Re: HTML code to refresh page every X seconds...?

    You can do it with HTML too.
    Code:
    <!-- n = seconds -->
    <meta http-equiv="refresh" content="n" />

  4. #4
    Code Warrior Egz0N is a name known to all Egz0N is a name known to all Egz0N is a name known to all Egz0N is a name known to all Egz0N is a name known to all Egz0N is a name known to all Egz0N's Avatar
    Join Date
    Sep 2008
    Location
    Kosovo
    Age
    18
    Posts
    4,034

    Re: HTML code to refresh page every X seconds...?

    worked for me with HTML .. thnx nullbyte

  5. #5
    Xav
    Xav is offline
    Code Slinger Xav has much to be proud of Xav has much to be proud of Xav has much to be proud of Xav has much to be proud of Xav has much to be proud of Xav has much to be proud of Xav has much to be proud of Xav has much to be proud of Xav has much to be proud of Xav's Avatar
    Join Date
    Mar 2008
    Location
    The North Pole
    Posts
    13,210
    Blog Entries
    13

    Re: HTML code to refresh page every X seconds...?

    I am glad to see that Jordan recommended some XHTML instead of the awful HTML that dargueta provides.

    Quote Originally Posted by Jordan View Post
    Good members, like yourself, stick around and post for ages to come!
    Mr. Xav | Blog | Forums

  6. #6
    Learning Programmer jashsayani is an unknown quantity at this point jashsayani's Avatar
    Join Date
    Jun 2008
    Posts
    38

    Re: HTML code to refresh page every X seconds...?

    Quote Originally Posted by nullbyte View Post
    You can do it with HTML too.
    Code:
    <!-- n = seconds -->
    <meta http-equiv="refresh" content="n" />
    Thanks a lot.

    ____________

    SOLVED

  7. #7
    Xav
    Xav is offline
    Code Slinger Xav has much to be proud of Xav has much to be proud of Xav has much to be proud of Xav has much to be proud of Xav has much to be proud of Xav has much to be proud of Xav has much to be proud of Xav has much to be proud of Xav has much to be proud of Xav's Avatar
    Join Date
    Mar 2008
    Location
    The North Pole
    Posts
    13,210
    Blog Entries
    13

    Re: HTML code to refresh page every X seconds...?

    If you don't mind me saying, this question could be solved in two seconds flat with a Google search.

    Quote Originally Posted by Jordan View Post
    Good members, like yourself, stick around and post for ages to come!
    Mr. Xav | Blog | Forums

  8. #8
    Administrator Jordan is a name known to all Jordan is a name known to all Jordan is a name known to all Jordan is a name known to all Jordan is a name known to all Jordan is a name known to all Jordan's Avatar
    Join Date
    Nov 2005
    Location
    Hendersonville, NC
    Posts
    24,556
    Blog Entries
    97

    Re: HTML code to refresh page every X seconds...?

    10 seconds seems slow. At home some webpages take 15-20 seconds for me to load. Your page would reload before it ever finished loading the first time. Have you considered using AJAX to make your page dynamic without refreshing?

  9. #9
    Co-Administrator John is a glorious beacon of light John is a glorious beacon of light John is a glorious beacon of light John is a glorious beacon of light John is a glorious beacon of light John's Avatar
    Join Date
    Jul 2006
    Age
    21
    Posts
    5,885
    Blog Entries
    25

    Re: HTML code to refresh page every X seconds...?

    Quote Originally Posted by Jordan View Post
    10 seconds seems slow. At home some webpages take 15-20 seconds for me to load. Your page would reload before it ever finished loading the first time. Have you considered using AJAX to make your page dynamic without refreshing?
    10 seconds seems slow? I thought that was quite fast.

  10. #10
    Xav
    Xav is offline
    Code Slinger Xav has much to be proud of Xav has much to be proud of Xav has much to be proud of Xav has much to be proud of Xav has much to be proud of Xav has much to be proud of Xav has much to be proud of Xav has much to be proud of Xav has much to be proud of Xav's Avatar
    Join Date
    Mar 2008
    Location
    The North Pole
    Posts
    13,210
    Blog Entries
    13

    Re: HTML code to refresh page every X seconds...?

    Sometimes CC takes about 25 seconds for me to load.

    Quote Originally Posted by Jordan View Post
    Good members, like yourself, stick around and post for ages to come!
    Mr. Xav | Blog | Forums

+ Reply to Thread
Page 1 of 2
1 2 LastLast

Thread Information

Users Browsing this Thread

There are currently 3 users browsing this thread. (0 members and 3 guests)

     

Similar Threads

  1. Principles of HTML Code Optimization
    By Lema25 in forum HTML Programming
    Replies: 6
    Last Post: 11-10-2008, 02:47 PM
  2. About HTML
    By Onur in forum Tutorials
    Replies: 0
    Last Post: 08-28-2007, 06:13 PM
  3. Special tags to display html code on the page
    By Bodyag in forum HTML Programming
    Replies: 4
    Last Post: 04-10-2007, 09:38 AM
  4. HTML Introduction
    By clookid in forum Tutorials
    Replies: 5
    Last Post: 01-08-2007, 09:43 PM

Bookmarks

Bookmarks

     
        Algorithms and Data Structures

        Java tutorials

        Algorithms Forum

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts