Applying AJax to my code

you'll have to modify the html to

  • modify the sections that will need update so that they have a ID in the DOM
  • include javascript stuff to trigger an update every n second
  • this update triggers a function that triggers an XMLHttpRequest, get some data back in a format you'll have to define and update the DOM with the response.

you'll have to modify the C++ code to

  • identify that you got a GET from the XMLHttpRequest
  • build an answer in the right format and send it back

I've a tutorial in French for an ESP8266 that walks through those steps. Using google translate you can probably get the main part and see how this is managed in code