I work with Water Treatment Controllers which have embedded web servers. Some controller's that I try to connect to using Firefox do not render the HTML that is returned from the web server. Instead, Firefox (v11) displays the HTML as raw text. Other browsers (Chrome, IE, Safari) render the HTML fine. Firefox v2 rendered the HTML fine, too.

In troubleshooting the problem, I discovered that the controllers that Firefox do not render HTML for have invalid Response Headers. Specifically, the entire set of Response Headers is no more than...

200 OK

The Response Headers from the other controllers that Firefox correctly renders HTML look like...

Date: Mon, 6 Jan 2012 07:08:47 GMT 
Server: Z-World Rabbit 
Connection: close 
Content-Type: text/html

200 OK

It's obvious to me that Firefox is not rendering the HTML if/when the Response Header does not contain the Content-Type: text/html mime type field.

Since I am unable to change the Response Headers that are returned from the controllers, I would like to know if there is a setting in Firefox that will tell Firefox to render content as HTML even if the Content-Type: is missing from the Response Header.


Try this addon called "Force Content-Type" - I haven't tested it myself but it seems to do what you need.

| improve this answer | |
  • 1
    Force Content-Type does the job! For the record, since the original HTTP Headers did not contain a Content-Type field, when adding a new rule in the Force Content-Type extension, I had to specify the regular expression "\S" as the "Old Content-Type". – Jed May 5 '12 at 14:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.