Recommended Posts

Hi,

I use Vista Ultimate x64 with all the latest patches.

I have setup IIS 7 on my machine and I can access the local website using http://localhost.

In IIS, I have changed the MIME type for "*.html" documents to be served as "application/xhtml+xml".

I have created a couple of XHTML documents (XHTML 1.0 Strict DTD) and placed them in the web directory. One of them is a well-formed XHTML document validated with W3C Validation service. In the other document, I have omitted the closing angle bracket of the End Tag of the html element (e.g. "</html").

Now this is what happens when I open the pages in IE 7 and Firefox:

In IE, I open testpage1.html by typing "http://localhost/testpage1.html" and it works perfectly. When I open the other document "http://localhost/testpage2.html" it still opens but shows a "</html" string at the end because of the wrong tag syntax (omitted angle bracket).

In Firefox, the http://localhost/testpage1.html works fine and when I access http://localhost/testpage2.html it displays the following error message:

XML Parsing Error: unclosed token

Location: http://localhost/testpage2.html

Line Number 14, Column 1:

</html

^

Now the behavior of Firefox is understood and it is as per the specifications of XHTML 1.0. And it also proves that the documents are indeed served as XHTML. If the documents weren't served as XHTML, Firefox wouldn't have displayed the above error message which was evident from another experiment where I configured the pages to be served as "text/html".

However, I don't understand why IE 7 opens both the XHTML documents because I have read at so many places that IE doesn't support XHTML documents served as "application/xhtml+xml". From what I read, I understand that IE 7 should instead prompt me to download and save the files instead of displaying them.

Here is the markup of testpage1.html:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<head>

<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />

<title>Test</title>

</head>

<body>

<p>Test XHTML</p>

</body>

</html>

In testpage2.html, I have copied the same markup and only removed the last angle bracket (last line would read "</html") to simulate an error.

Can somebody explain why IE7 which doesn't support "application/xhtml+xml" behaves in the way mentioned above?

Am I missing something? Is the default configuration of the IIS 7 has something to do with this?

Thanks

EDIT:

I will also like to add that I have checked the HTTP Response Headers for both IE and Firefox. In both cases the "content-type" is set to "application/xhtml+xml". I am inclined to believe that this behavior of IE has something to do with file name extension (".html" or ".xhtml").

Edited by freak4ever
Link to comment
https://www.neowin.net/forum/topic/622602-ie-7-and-xhtml/
Share on other sites

  • 2 weeks later...
In IIS, I have changed the MIME type for "*.html" documents to be served as "application/xhtml+xml".

Don't do that, All it does is break normal HTML files and sends XHTML files (*.xhtml) as HTML.

And yeah, you can force IE to treat XHTML as HTML (even with the proper mimetype), Although it's easier to just send it the old mimetype.

Link to comment
https://www.neowin.net/forum/topic/622602-ie-7-and-xhtml/#findComment-589273074
Share on other sites

actually, IE (any version, even 8) doesn't support application/xhtml+xml at all, and all you'll get is a download prompt. so just the fact that it's displaying means that somewhere along the line something's ****ing up such that the page isn't being served as xhtml to IE.

edit: now that i think about it, since you assigned the mime type to .html, it's probably being served properly, but since IE can't handle mime types at all, it's just ignoring your mime type and guessing the page to be HTML from the extension, thus rendering it as HTML. The download prompt probably comes from just about everyone serving XHTML with a scripting extension (.php) so IE doesn't know what to do with it, hence a prompt.

Edited by Primexx
Link to comment
https://www.neowin.net/forum/topic/622602-ie-7-and-xhtml/#findComment-589276139
Share on other sites

Could you please follow these instructions and report back to us?

(1) Click "Start"

(2) Click "Run"

(3) Type "regedit" (without quotation marks)

(4) Click "OK"

(5) Expand "HKEY_CLASSES_ROOT"

(6) Expand "MIME"

(7) Expand "Database"

(8) Expand "Content Type"

Do you see a folder in the "Content Type" section titled "application/xhtml+xml"? If you do, this probably explains why you are not presented with a download prompt when accessing a document served with the "application/xhtml+xml" mimetype.

If you do see such a folder, click on it. To the right you will see some text, "CLSID". To the right of that text you'll probably see "REG_SZ" and "{25336920-03F9-11cf-8FD0-00AA00686F13}". If that is true, this explains why Internet Explorer is attempting to render the page instead of asking you if you want to download or not. That long string of numbers and letters basically tells programs to treat documents that are served with the "application/xhtml+xml" mimetype as if they were being sent with the "text/html" mimetype. As such, Internet Explorer interprets XHTML documents served with the "application/xhtml+xml" mimetype as regular HTML documents.

That could pose problems when upgrading Internet Explorer in the future. To ensure trouble-free upgrades, you should delete the "application/xhtml+xml" folder by right-clicking on it and then clicking "Delete." Once you delete the folder, restart Windows and test your document again—Internet Explorer should ask you if you want to download the file.

If you did see such a folder and deleted it, are you being asked to download the file? If you did not see such a folder, please reply and let us know.

Link to comment
https://www.neowin.net/forum/topic/622602-ie-7-and-xhtml/#findComment-589280531
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • Euro-Office must default to ODF to be considered "genuinely European", LibreOffice argues by David Uzondu Euro-Office is a web-based collaborative office suite that positions itself as a "European sovereign alternative" to American tech companies, backed by a coalition of developers including Nextcloud, IONOS, Abilian, BTactic, OpenProject, and, more recently, Tuta. The project officially went live a couple of days ago, but not before drawing heavy fire from LibreOffice developers, who called the marketing claim that Euro-Office represents the "first open-source office suite developed in Europe" a deceptive historical inaccuracy because projects like OpenOffice and LibreOffice existed decades earlier. Now that the project has launched, LibreOffice is back with another complaint, arguing that Euro-Office cannot consider itself "genuinely European" while it pushes proprietary Microsoft defaults on users. Euro-Office had promised to improve the OpenDocument Format (ODF) back in April, but the current release still plagues users with several technical failures. For instance, the suite lacks an admin setting to enforce ODF, and mobile editors completely block ODF saves, forcing files into Microsoft's OOXML formats. Some configurations force files into read-only mode, while editing frequently corrupts document formatting or erases data. LibreOffice thinks that merely supporting a format as an afterthought does not make you a sovereign alternative, as file formats are the battleground where" digital sovereignty is won or lost." The road to the first stable release of Euro-Office has been quite bumpy due to an aggressive public fallout with OnlyOffice, from which the coalition originally forked the project. OnlyOffice struck back by accusing the coalition of violating copyright terms under its AGPLv3 branding requirements by stripping the original branding anyway and forking the code. Getting Euro-Office up and running is a bit wonky (at least for non-technical users), as there is no direct installer to grab off the web. The easiest way we learnt is by using Docker. First, pull the official Euro-Office image from the GitHub Container Registry: docker pull ghcr.io/euro-office/documentserver:latest Then, run the container with active ports and a secure JWT token, enabling the test environment: docker run -i -t -d -p 8080:80 --restart=always -e EXAMPLE_ENABLED=true -e JWT_SECRET=my_secure_jwt_secret ghcr.io/euro-office/documentserver:latest And finally, open a web browser and go to the following address: http://localhost:8080 If you are running this on a remote server, replace localhost with your server's IP address. You will see the Euro-Office test page, where you can create new text documents, spreadsheets, or presentations directly in the browser. Image via Euro-Office Nextcloud promises that proper standalone desktop versions and mobile apps will arrive in a future release.
    • It’s any of their products not just windows.
    • Google Gemini has been failing for users across the United States, Europe, and Asia since early Wednesday morning, June 10, 2026, and more than six hours into the incident Google has yet to declare a fix............. https://www.techtimes.com/articles/318152/20260610/google-gemini-outage-tops-six-hours-errors-1076-1099-worldwideflash-lite-still-answers.htm
    • Fun fact: There are more Warhammer 40k games than there are stars in the universe.
  • Recent Achievements

    • Week One Done
      FBSPL earned a badge
      Week One Done
    • One Year In
      Jim Dugan earned a badge
      One Year In
    • One Month Later
      Tommi118 earned a badge
      One Month Later
    • One Month Later
      sjbousquet earned a badge
      One Month Later
    • Week One Done
      sjbousquet earned a badge
      Week One Done
  • Popular Contributors

    1. 1
      +primortal
      486
    2. 2
      PsYcHoKiLLa
      197
    3. 3
      +Edouard
      155
    4. 4
      Steven P.
      83
    5. 5
      ATLien_0
      69
  • Tell a friend

    Love Neowin? Tell a friend!