Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

HTML displays as text only from the web

  • 4 replies
  • 0 have this problem
  • 1 view
  • Last reply by Questor

more options

I have a dozen old embedded device modules (circa 2003) which can host a web page. When I access the device through my local intranet (192.168.0.xxx), the web page displays correctly. However, when the same page is accessed through my DNS service (xxx.gotdns.org:xxxx) over the web, the Firefox INSPECT:network tool indicates that the document is type:text and displays the HTML in a text format. The first line of the HTML document is :<!DOCTYPE html>.....

These devices are non-secure information-only devices, but at least Firefox allows for HTTP: exceptions.

However, I cannot understand why Firefox treats the same content differently depending on the path. Is there a way to force Firefox to actually look at the contents of the packet and treat it accordingly?

I have a dozen old embedded device modules (circa 2003) which can host a web page. When I access the device through my local intranet (192.168.0.xxx), the web page displays correctly. However, when the same page is accessed through my DNS service (xxx.gotdns.org:xxxx) over the web, the Firefox INSPECT:network tool indicates that the document is type:text and displays the HTML in a text format. The first line of the HTML document is :&lt;!DOCTYPE html&gt;..... These devices are non-secure information-only devices, but at least Firefox allows for HTTP: exceptions. However, I cannot understand why Firefox treats the same content differently depending on the path. Is there a way to force Firefox to actually look at the contents of the packet and treat it accordingly?

Modified by cor-el

Chosen solution

Thanx Jeff, What threw me off-course was that browsers treated content differently. What I should have been looking at was a "simple" web site that I could capture with WireShark. It's almost impossible to find a "Simple" site.

I made some progress. The SitePlayer device (circa 2002) is just too old and does not preface a GET response with the new required information. More up-to-date servers add the following:


HTTP/1.0 200 OK Pragma: no-cache Content-Type: text/html


So, I added the proper lines to the HTML file and it loaded properly. Without access to the Siteplayer Source Code, it's the best I can do.....

Read this answer in context 👍 0

All Replies (4)

more options

This likely means that the web server software you are using doesn't send .htm(l) files as text/html, but sends them as text/plain like you noticed. You need to check the docs of that server software to see how to configure the server.

more options

Sorry, this doesn't explain why Firefox (even as early as 35.0.1) treats identical web pages differently depending on the network path. Attached is an image of a simple web page that worked OK locally, but not via the internet.

A. To allow off-site access to intranet devices, I use my Router Port Forwarding with a DNS server which routes requests to port 80. Any problems with this?? B. it does work on older versions of Win-7 Internet Explorer ver 11. C It doesn't work with MS Edge, something about an invalid HTTP Response, but I don't use Edge.... D. I used WireShark to capture the 2 conversations and, with the exception of the source address, the content was the same.

Modified by Questor

more options

Open the Network Monitor panel (Ctrl+Shift+E) and then load or reload the page. Click the row that has the main page request and in the pane on the right side, check the Response Headers for the Content-Type. It would make no sense for the Content-Type to be text/html in one case and text/plain in the other, but that sounds like what Firefox is receiving. What do you see?

more options

Chosen Solution

Thanx Jeff, What threw me off-course was that browsers treated content differently. What I should have been looking at was a "simple" web site that I could capture with WireShark. It's almost impossible to find a "Simple" site.

I made some progress. The SitePlayer device (circa 2002) is just too old and does not preface a GET response with the new required information. More up-to-date servers add the following:


HTTP/1.0 200 OK Pragma: no-cache Content-Type: text/html


So, I added the proper lines to the HTML file and it loaded properly. Without access to the Siteplayer Source Code, it's the best I can do.....