Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. Creating automatic updating web pages

Creating automatic updating web pages

Scheduled Pinned Locked Moved Web Development
tutorialsysadmintoolsquestion
6 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    Krishnan V
    wrote on last edited by
    #1

    Hi All! My company has a requirement, wherein we need to develop a web server which could server data to its clients in "real-time". For example, I need to create a web page for real time stock quotes, which is automatically updated as and when the quotes change. Can the server be designed such that it sends automatic updates to the client as and when the data changes, or does the client have to make an explicit "refresh"? Since I am new to web development, could you please guide me about which tools/technologies can I best use for this purpose. Thanks, Krishnan

    J J 2 Replies Last reply
    0
    • K Krishnan V

      Hi All! My company has a requirement, wherein we need to develop a web server which could server data to its clients in "real-time". For example, I need to create a web page for real time stock quotes, which is automatically updated as and when the quotes change. Can the server be designed such that it sends automatic updates to the client as and when the data changes, or does the client have to make an explicit "refresh"? Since I am new to web development, could you please guide me about which tools/technologies can I best use for this purpose. Thanks, Krishnan

      J Offline
      J Offline
      Javier Lozano
      wrote on last edited by
      #2

      The server does not keep track of the user that makes the request. Since HTTP is stateless (make the request, get data back), it's nearly imposible to do it. The client will have to 'refresh' itself on an interval basis to pull back the latest data. If the client is a web browser, you could implement some JavaScript that posts back to the server every couple seconds. ~Javier Lozano (blog)

      T 1 Reply Last reply
      0
      • J Javier Lozano

        The server does not keep track of the user that makes the request. Since HTTP is stateless (make the request, get data back), it's nearly imposible to do it. The client will have to 'refresh' itself on an interval basis to pull back the latest data. If the client is a web browser, you could implement some JavaScript that posts back to the server every couple seconds. ~Javier Lozano (blog)

        T Offline
        T Offline
        tecnovate_vivek
        wrote on last edited by
        #3

        Your other option could be to implement the attritbute in your HTML page. THis will however cause the page to automatically refresh on the server every 5 seconds. Vivek Sharma

        1 Reply Last reply
        0
        • K Krishnan V

          Hi All! My company has a requirement, wherein we need to develop a web server which could server data to its clients in "real-time". For example, I need to create a web page for real time stock quotes, which is automatically updated as and when the quotes change. Can the server be designed such that it sends automatic updates to the client as and when the data changes, or does the client have to make an explicit "refresh"? Since I am new to web development, could you please guide me about which tools/technologies can I best use for this purpose. Thanks, Krishnan

          J Offline
          J Offline
          JKroschel
          wrote on last edited by
          #4

          The problem with doing it throught a web page, as the other responses have mentioned, is that a web server does not constantly talk back and forth with the client. It only offers the info once. A better way to do what you want to do is via a java app. You could have a client app embedded in a web page so that your customers could still use their browser, but then you would have another server app on your side which stays connected to the client java app, constantly offering the latest data.

          K 1 Reply Last reply
          0
          • J JKroschel

            The problem with doing it throught a web page, as the other responses have mentioned, is that a web server does not constantly talk back and forth with the client. It only offers the info once. A better way to do what you want to do is via a java app. You could have a client app embedded in a web page so that your customers could still use their browser, but then you would have another server app on your side which stays connected to the client java app, constantly offering the latest data.

            K Offline
            K Offline
            Krishnan V
            wrote on last edited by
            #5

            Thanks for the suggestions. But, having an embedded Java app or an ActiveX requires that my customers have them pre-installed or that they are automatically downloaded and installed on his computer. Even though I would not prefer such a method, I am still open to it, as I feel it is better than the client doing a periodic refresh. However, will this solution work for browsers running on embedded platforms like, mobile phones, PDAs, etc.? Thanks, Krishnan

            H 1 Reply Last reply
            0
            • K Krishnan V

              Thanks for the suggestions. But, having an embedded Java app or an ActiveX requires that my customers have them pre-installed or that they are automatically downloaded and installed on his computer. Even though I would not prefer such a method, I am still open to it, as I feel it is better than the client doing a periodic refresh. However, will this solution work for browsers running on embedded platforms like, mobile phones, PDAs, etc.? Thanks, Krishnan

              H Offline
              H Offline
              Hemant Mane
              wrote on last edited by
              #6

              Why don't you use iframes. when user complete the action on that event pass the parameter to iframe which call the another page and on that page you can write the code of save. it will refresh only iframe not the whole page. with the help of iframe you can do easly update and client page cannot be refresh only iframe will refresh for that particular task of saving first make a page and onload of this page write the code for saving perticular data to database and the saving code will be the parameter that u pass to tha iframe which call the page of saving. and in iframe just give source of that page with passing parameter. that time only iframe will refresh and your saving page do the task of saving and client can do his work without whole page loading. If u understand this then ok or mail me i will send u whole code of iframe how they work and how they usefull when u dont want to load or refresh whole page. (Hemant U. Mane)

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups