title: Display dynamic content from embedded web server
body: <p>I have an embedded device running a slimmed down version of a HTTP server. Currently, it can display static HTML pages. Here is an example of how it displays a static HTML page:</p>
  
  <pre><code>   char *text="HTTP/1.0 200 OK\r\nContent-Type: text/html\r\n\r\n"
            "&lt;html&gt;&lt;body&gt;Hello World!&lt;/body&gt;&lt;/html&gt;";
     IPWrite(socket, (uint8*)text, (int)strlen(text));
     IPClose(socket);
  </code></pre>
  
  <p>What I'd like to do is display dynamic content, e.g. a reading from a sensor. What I thought of so far is to have the page refresh every once in awhile with </p>
  
  <pre><code>&lt;meta http-equiv="refresh" content="600"&gt;
  </code></pre>
  
  <p>and use sprintf() to attach the sensor reading to the <em>text</em> variable for the response. </p>
  
  <p>Is there a way I can do this without having to refresh the page constantly?</p>