Firefox does not render HTML on certain websites

2

Possible Duplicate:
Firefox does not render HTML if Content-Type HTTP Header is missing

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.

Jed

Posted 2012-05-04T23:04:59.387

Reputation: 315

Question was closed 2012-05-05T18:46:27.077

GreaseMonkey could be setup to fix the borked webpages too. – Chris S – 2012-05-05T02:15:27.530

Your example isn't even valid HTTP. Looks like a badly implemented embedded server. What you need is a protocol droid... – Keith – 2012-05-05T04:14:15.813

@ChrisS - The problem is not with the HTML content of the web page, but rather with the HTTP Header Fields (or the lack thereof). – Jed – 2012-05-05T05:19:27.307

@Jed I understand that. HTML can set the content type and override the HTTP Header. GreaseMonkey can change the HTML and add the Content Type. W3-Schools has a good example of the tag, as always. I'm not savvy enough with GM to whip up a script, but it's only JavaScript and there are many similar examples around.

– Chris S – 2012-05-05T14:30:54.910

Answers

1

Thanks to @ultrasawblade who answered this question here

The simple fix is to install the Firefox extension "Force Content-Type". Then, when adding a new rule, set the "Old Content-Type" to the regular expression "\S" (I use this RE because the original HTTP Header didn't include a "Content-Type" field).

Jed

Posted 2012-05-04T23:04:59.387

Reputation: 315