The latest revision is working, at least from the C side.
So far the keepalive mechanism is working well but there is just one issue : the page can be opened in two tabs of the same web browser...
I need to find a trick to prevent this !
The root HTTaP object includes a new element : "HTTaP_open" is 0 when /? is first accessed, and 1 subsequently.
It is up to the client to detect this situation and avoid loading anything else to prevent disruption of the already established connection.
I have also solved the problem of dangling/open connections when the page is closed or reloaded !