Welcome to WebmasterWorld Guest from

Forum Moderators: open

Message Too Old, No Replies

setting default document mode in IE9

4:19 pm on Apr 10, 2012 (gmt 0)

5+ Year Member

My website loads in default document mode for IE7, even though I'm viewing it with IE9 and have not specified any compatibility modes in the <head> tag. (I don't get the problem on other sites, so I know it's not a browser issue.)

Is there some specific <!DOCTYPE>, <html>, or <meta> tag I need to use to indicate IE9? The following don't work:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<Meta http-equiv="content-type" content="text/html; charset=utf-8" />

Neither do the more basic:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang=en-US>
<meta http-equiv="Content-type" content="text/html; charset=ISO-8859-1">
1:10 pm on Apr 11, 2012 (gmt 0)

5+ Year Member

I just copied the source code of a page from another site that displays with default doc mode for IE9 and loaded it onto a page on my site and it shows up as default doc mode for IE7. Is it possible that my web host is putting out some header that's affecting this?
6:34 am on Oct 11, 2012 (gmt 0)

5+ Year Member

See here Microsoft documentation on defining the compatibility of a document: [msdn.microsoft.com...]

Hope that helps!