Firefox shows HTML Code for the webpage and not the actual page

Have a Uno connected to a Ethernet shield and two temperature sensors which connect to my home router. The Arduino is hosting a basic web page.
Using Internet Explorer or Chrome shows the web page as expected BUT with Firefox Browser (latest version 30.0) it just shows the html code.
Is there any special setup required in the arduino code or in Firefox to overcome this problem ?

firefox seems to interpret it as text
==>
probably the HTML is missing some tag or has a space where it is not wanted

Can you post the HTML code (copied from FF screen)?

make sure your Arduino is sending the content type text/html.

I Firefox will not guess like other browsers do. The link has a way for you to check what header data is received by the browser. Something may be missing or spelled wrong. Properly configuring server MIME types - Learn web development | MDN

By comparing the problem code I had copied from example in chapter 17 of "Beginning Arduino 2nd edition by McRoberts"
to the Arduino Example in "Examples\Ethernet\WebServer" I discovered the following:

//client.println("HTTP/1.1 200 OK\n"); // Standard HTTP response // no good with Firefox
client.println("HTTP/1.1 200 OK"); // Standard HTTP response

Nope this is useful for others doing a web search on the topic.

Regards :slight_smile: :slight_smile: :slight_smile:

aha an extra empty line