Christian Benincasa
Christian Benincasa

Reputation: 1215

Doctype declaration Internet Explorer error

I have this DOCTYPE declaration on my web page, and it is causing an error in Internet Explorer 8 and prior versions. I've used this DOCTYPE before and have had the page load with no errors in Internet Explorer.

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

This page is working fine in all other browsers. This is the error I receive from IE8 and earlier versions.

The XML page cannot be displayed.

Cannot view XML input using style sheet. Please correct the error and then click the Refresh button.

Unspecified error Error processing resource 'http://www.w3.org/TR/html4/strict.dtd'.

Any help would be greatly appreciated.

Upvotes: 2

Views: 6629

Answers (3)

varfoo
varfoo

Reputation: 228

Most browsers go into quirks mode if the xhtml is invalid but IE will display an error instead if you use xhtml instead. I would suggest either fixing the markup or switching to xhtml-transitional or html5.

Upvotes: 0

GolezTrol
GolezTrol

Reputation: 116200

Your XML is probably invalid. Invalid XML should not be processed, except maybe by a repair tool. IE does this right. Please check your page using the W3 validator: http://validator.w3.org/

Upvotes: 2

Adam Casey
Adam Casey

Reputation: 1620

Try the HTML5 DOCTYPE

<!DOCTYPE html>

It could be because the page isn't being sent with the XML mime type

Upvotes: 1

Related Questions