Question re: HTML served by Micromite


Author Message
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3811
Posted: 11:30am 27 Apr 2017      

This is really an HTML question, not a Micromite question, but I think it's related to my HTML being served by a Micromite Explore-28 instead of a normal server, so I'll ask here.

Here is the page I'm serving:



It displays well, but the connection doesn't close, which causes problems with Chrome on a PC (I have to press "Reload") but not on Firefox and other browsers I've tested. The problem also occurs on Opera and Chrome on Android.

I start the transmission after the Micromite decodes a request with:
HTTP/1.1 200 OK
Content-type: text/html
Connection: close

Then the body:
<html> <title>Solar Greenhouse System</title> <head></head> <BODY bgcolor='#d0d0d0'>

[etc.]
and close with " </form> </BODY> </html>"

I have "Y"ed off the serial output from the Micromite to a serial port for monitoring, so I can see that this is exactly what is being sent.

The requests I'm getting from the different browsers include "Connection: keep-alive", which I suspect is causing my problem. With the Firefox browser, the page loads but the little wheel on the browser tab goes round and round (as can be seen in the image)--but with Chrome, I get "Page can't load", but [Reload] works (and the wheel goes around).

Is there something else I can do to make sure the connection closes (assuming that that is my problem)?

I've attached the entire HTML output. The part beginning <html> can be saved to a file and it loads perfectly well into a browser.

2017-04-27_212427_gh_html_output.zip

(I have addressed the "favicon" issue with an embedded data icon, if anyone thinks that might be the problem--I see now no favicon requests.)Edited by lizby 2017-04-28