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

    • I recently tried edge. It seems a lot better. A lot of the junk in it is gone. It seems less bloated and snappy.
    • Lethal fake phone chargers are still being sold on Amazon and eBay, UK watchdog warns by Paul Hill Credit: Pexels The UK consumer rights organization, Which?, is claiming that “potentially lethal knock-off chargers” are still being sold on online marketplaces seven years after it exposed the danger of these chargers. In its latest investigation, it bought 15 USB phone chargers from several online marketplaces and found they were missing key information, meaning they cannot be legally sold in the UK. Which? bought the 15 chargers from seven online marketplaces. These were Amazon (including Amazon Haul), AliExpress, B&Q Marketplace, Debenhams Marketplace, and eBay. It said that the chargers were so badly made that anyone using them was at risk of electric shock. Over half the chargers also posed fire and explosion risks. Of the chargers purchased, one was a fake Apple USB-C 35W power adaptor charger. To confuse buyers, the box was branded with an Apple logo, but testing found it to be a fake. Further testing picked up arcing sounds after 10 seconds of use, where a current jumps between two parts of the electrical circuit, which can cause fires, explosions, or electric shock. The manufacturers of this particular charger also put modeling clay inside it to make it feel more weighty, robust, and genuine. Not all of the chargers were technically faulty; however, some were missing key packaging, markings, and documentation, meaning they can’t be sold in the UK legally. Which? said that it is now campaigning alongside a coalition of safety groups and businesses for new laws that make online marketplaces responsible for ensuring the safety of products that they choose to list on their websites. It also said the government needs to start using powers under the Product Regulation and Metrology Act, which was adopted last July, to impose safety requirements on online marketplaces via secondary legislation, but so far, there have been delays. No matter what country you are in, be sure to properly research what you are buying and only buy authentic chargers to prevent fires. You can read more about Which?’s research here.
    • Visual Studio finally gets long-awaited feature that developers will love by Usama Jawad Visual Studio Code is Microsoft's popular, lightweight, open-source code editor, it is actually Visual Studio that is the company's flagship integrated development environment (IDE). Although the IDE already offers a boatload of useful features for developers, Microsoft has finally introduced a long-requested capability that will be loved by many. While developers have already been able to create Git pull requests (PRs) directly within Visual Studio for the past couple of years, it had not been possible to review a PR without switching to the browser, until now. Microsoft revealed in December 2025 that it is working on UX that enables developers to do just that, and fast-forward to June 2026, and Visual Studio finally has native capabilities to open and inspect a PR, discuss feedback, and wrap up the review, all without switching to the browser. This integration works for both GitHub and Azure DevOps (including on-prem). Developers have access to multiple surfaces to open a PR, including Git Repository, Git Changes, and the Git menu in Visual Studio. Once you open a PR, all the important details will be immediately visible to you, from where you can navigate to various levels of granularity and branch states, depending on the reviews that you are engaged in. As you would expect, you also get a diff view that enables you to see code changes inline or side-by-side in a separate panel. You can also review commit-by-commit. Additionally, this UX fosters collaboration as you can leave comments, reply to threads, and resolve conversations easily. Naturally, you can also leverage Copilot to apply a code suggestion to fix a potential issue. When you are done, you have the ability to approve, complete, and merge the PR. This is a pretty major feature as it has been requested heavily for the past few years. You can try it out in Visual Studio 2026 version 18.7, made available here recently. Microsoft plans to enhance this experience further in future releases with comment filtering, a timeline of PR activity, and more.
    • This AdGuard Family lifetime deal is still only $15.97 by Steven Parker Today's highlighted Neowin Deal comes via our Apps + Software section, where you can get a lifetime subscription and save 90% on a lifetime AdGuard Family Plan. AdGuard is a unique program that has all the necessary features for what they claim to be "the best web experience." The software combines the an advanced ad blocker, a privacy protection module, and a parental control tool—all working in one app. This software deals with annoying ads, hides your data from a multitude of trackers, protects you from malware attacks, and even lets you restrict your kids from accessing inappropriate content. Install AdGuard and see the internet as it was supposed to be: clean and safe. Get rid of annoying banners, pop-ups & video ads once and for all Hide your data from the multitude of trackers & activity analyzers that swarm the web Avoid fraudulent and phishing website and malware attacks Protect your kids online by restricting them from accessing inappropriate & adult content Good to know Family Plan Length of access: lifetime This plan is only available to new users Redemption deadline: redeem your code within 30 days of purchase Max number of devices: 9 Access options: desktop & mobile Software version: AdGuard Family Updates included A lifetime subscription of AdGuard Family Plan normally costs $169.99, but this deal can be yours for just $15.97, that's a saving of $157.02. For full terms, specifications, and license info please click the link below. Get this AdGuard Family lifetime deal for just $15.97 (was $169.99) Although priced in U.S. dollars, this deal is available for digital purchase worldwide. As an online publication, Neowin too relies on ads for operating costs and, if you use an ad blocker, we'd appreciate being whitelisted. In addition, we have an ad-free subscription for $28 a year, which is another way to show support! Support queries If you have queries or need support for any of the Neowin Deals, please use the contact form here. Neowin Deals are managed and sold by StackCommerce who represent Neowin on an affiliate basis. Why we post these deals We post these because we earn commission on each sale so as not to rely solely on advertising, which many of our readers block. It all helps toward paying staff reporters, servers and hosting costs. So for those that keep moaning and complaining, be thankful we're still online for you to even do that. Other ways to support Neowin Whitelist Neowin by not blocking our ads Create a free member account to see fewer ads Make a donation to support our day to day running costs Subscribe to Neowin - for $14 a year, or $28 a year for an ad-free experience Disclosure: Neowin benefits from revenue of each sale made through our branded deals site powered by StackCommerce.
    • the MCT currently downloads 26200.8653, so not completely up to date.
  • Recent Achievements

    • Week One Done
      Timaximus earned a badge
      Week One Done
    • One Month Later
      Timaximus earned a badge
      One Month Later
    • Rookie
      FBSPL went up a rank
      Rookie
    • First Post
      davidbazooked earned a badge
      First Post
    • Week One Done
      davidbazooked earned a badge
      Week One Done
  • Popular Contributors

    1. 1
      +primortal
      499
    2. 2
      PsYcHoKiLLa
      174
    3. 3
      +Edouard
      160
    4. 4
      Steven P.
      84
    5. 5
      ATLien_0
      75
  • Tell a friend

    Love Neowin? Tell a friend!