Join us and the lead editor of IRL, Mozilla's multi-award-winning podcast, for a behind-the-scenes look at the pod and to contribute your ideas for the next season, themed: "AI and ME." Mark your calendar and join our Community Call on Wednesday, Aug 7, 17:00–17:45 UTC. See you there!

Támogatás keresése

Kerülje el a támogatási csalásokat. Sosem kérjük arra, hogy hívjon fel egy telefonszámot vagy osszon meg személyes információkat. Jelentse a gyanús tevékenységeket a „Visszaélés bejelentése” lehetőséggel.

További tudnivalók

A témacsoportot lezárták és archiválták. Tegyen fel új kérdést, ha segítségre van szüksége.

FireFox renders html page on port 80, but lists html on port 8080.

  • 24 válasz
  • 1 embernek van ilyen problémája
  • 1 megtekintés
  • Utolsó üzenet ettől: Jim44685

more options

I am working on a WiFi controlled relay that is controlled by a webserver. The server sends HTML code. Everything works in FireFox as long as the port is 80. When I change the port to 8080, FireFox lists the HTML code, but doesn't render it. Internet Explorer displays the webpage correctly for port 80 and 8080. I have the HTML 5 header as the 1st line. Placing "http://" in front of the IP doesn't help.

I am working on a WiFi controlled relay that is controlled by a webserver. The server sends HTML code. Everything works in FireFox as long as the port is 80. When I change the port to 8080, FireFox lists the HTML code, but doesn't render it. Internet Explorer displays the webpage correctly for port 80 and 8080. I have the HTML 5 header <!DOCTYPE html> as the 1st line. Placing "http://" in front of the IP doesn't help.

Kiválasztott megoldás

Hi Jscher2000, Amazingly, that solved the problem!! FireFox now displays the webpage on port 9000. It still is a mystery why it always worked on port 80, but was "picky" on the other ports. The last few days were certainly frustrating at times. Anyway, thanks a lot for your help. JimK

Válasz olvasása eredeti szövegkörnyezetben 👍 0

Összes válasz (4)

more options

Hi Jim44685, here is a screenshot illustrating how to view the Response Headers for a request listed in the Network Monitor panel, and the particular one that I'm interested in.

more options

OK, here is what I got back, see pix... I've changed things back to the "original" settings. Local is 192.168.0.176:80 and remote is n8pxw.no-ip.org:9000. So you can use your browser with the Network Monitor in FireFox and view the results, if I left anything out.

more options

Hi Jim44685, thank you for the screenshot. It's puzzling because there's no "Response Headers" section (and there's no response code at the left end of the request line) and yet there is text in your browser from the host. Firefox is just not understanding it to be HTML.

I searched for srv=net.createServer(net.TCP) and found some examples. Could you try adding a line to this section of your code:

   --Buffer is sent in smaller chunks as due to limited memory ESP8266 cannot handle more than 1460 bytes of data.
   client:send('HTTP/1.1 200 OK\n\n');
   client:send(html_buffer);
   client:send(html_buffer1);
   client:close();

Hopefully that will lead Firefox to assume it is HTML.

more options

Kiválasztott megoldás

Hi Jscher2000, Amazingly, that solved the problem!! FireFox now displays the webpage on port 9000. It still is a mystery why it always worked on port 80, but was "picky" on the other ports. The last few days were certainly frustrating at times. Anyway, thanks a lot for your help. JimK

  1. 1
  2. 2