Webserver - auto update client

Hi

I’a trying to make a webserver; on the generated web-page I among other informations have the date and time; how to auto update the web-page? I makes no meaning to have a page including the date and time if it is not updated.

I found this: in another forum (not micro controler) but it does not work :frowning:

Thanks in advance

The meta refresh must be in the head of the document.

client.println("<HEAD><meta http-equiv=\"refresh\" content=\"5\"></HEAD>");

THX SurferTim

:) :)

karstenmentz: I'a trying to make a webserver; on the generated web-page I among other informations have the date and time; how to auto update the web-page?

Refresh web-page in that way is not perfect for uC world which has very restrain resource. If having some clients are doing refresh simultaneously it would be a problem. In other hand, there are many parts or even entire web content not changed so that not require doing a reload the content. Probably, the best way in this situation is used AJAX technique combining with JavaScript. It's only reloading the changed content. There are many tutorials for this technique. Google it and have fun