Auto refresh web page

前端 未结 10 2301
挽巷
挽巷 2021-02-12 19:06

I have a web page which allows the user to carry out various operations that in turn modify the database. Also, this web application needs to keep track of various fields in dat

相关标签:
10条回答
  • 2021-02-12 19:35

    I think you need something similar to Reverse AJAX now popularly known as Comet. It is server pushing the data to the client instead of browser polling the data from the server/database. http://en.wikipedia.org/wiki/Comet_(programming) has a good introduction. There are already many frameworks (e.g. DWR, ICEFaces) that support this pattern.

    0 讨论(0)
  • 2021-02-12 19:39

    Use AJAX with timer.Using this we can refresh the particular part in the page.

    0 讨论(0)
  • 2021-02-12 19:41

    This task is very easy use following code in html header section

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

    It will refresh your page after 30 seconds.

    0 讨论(0)
  • 2021-02-12 19:42

    That sounds like a functionality that would be better suited in a Flash or Silverlight application. Using an elaborate AJAX solution might be a bit more efficient than your but the reality is that web pages make a terrible medium for live content.

    0 讨论(0)
  • 2021-02-12 19:45

    I think that the following is a good solution with the refresh command in the header.

    When you call the httpSuccess function try to use this:

    server.httpSuccess("text/html","Refresh: 30\r\n");
    
    0 讨论(0)
  • 2021-02-12 19:48

    Short answer is NO. YOu can use ajax to update the necessary components. This reduces the load time and keeps your page from resetting.

    0 讨论(0)
提交回复
热议问题