Sunday, August 23, 2009

Set IE8 Compatibility Mode in Dot Net Nuke

Microsoft has just released Internet Explorer 8. Unfortunately, some of the pages on our website have some issues when viewed with IE8's default settings. In particular, the styling that we've done on our main page's tab control is causing issues. Users can fix these issues on the client side by selecting compatibility mode (the button to the right of the URL field shown below).






Of course, a client side fix is never a user friendly fix. Thankfully there is a meta tag that can be added to your site to force IE8 to automatically go into compatibility mode.

Our page is built in Dot Net Nuke. The appropriate way to apply this fix for DNN is to add the tag to the default.aspx file that is found in the root directory of your Dot Net Nuke website. Any meta tag that is placed in here should be applied to all pages to your website. Add the tag highlighted below in red at the top of the head section of the default.aspx file.

< id="Head" runat="server">
< equiv="X-UA-Compatible" content="IE=EmulateIE7">
< content="text/html; charset=UTF-8" equiv="Content-Type">

Note that the tag must be placed at the top of the head section. Also, be aware that updates of your DNN framework will overwrite this change.

1 comment:

  1. This gets overwritten in every DNN upgrade. An alternative method is to set it at the IIS level in the HTTP Response Headers property.

    ReplyDelete