Disable compatibility mode in IE?


I want to display a Vaadin-based app as a standalone application.
So I decided to use a SWT Browser (which uses native browser embedded in system).
The problem is - when I run the application in the SWT browser on Windows 7 it uses a compatibility mode of IE8, so the application has display errors.

Is there any way to tell the browser not to use a compatibility mode?
There is something like:

that should do the job, but is there any way to put that in Vaadin application?

Karol Stojek

Extend ApplicationServlet, override writeAjaxPageHtmlHeader and update web.xml to use your custom servlet class. Please note that it currently sets so you probably do not want to call the super method.

Something like this.

public class PushServlet extends ApplicationServlet {

    protected void writeAjaxPageHtmlHeader(BufferedWriter page, String title, String themeUri) throws IOException {
        // do not call super
        //super.writeAjaxPageHtmlHeader(page, title, themeUri);

        page.append("<meta name=\"viewport\" content="
                + "\"user-scalable=no, width=device-width, "
                + "initial-scale=1.0, maximum-scale=1.0;\" />");
        page.append("<meta name=\"apple-touch-fullscreen\" content=\"yes\" />");
        page.append("<meta name=\"apple-mobile-web-app-capable\" "
                + "content=\"yes\" />");
        page.append("<meta name=\"apple-mobile-web-app-status-bar-style\" "
                + "content=\"black\" />");

Thank you for fast response.
The solution worked, the header is changed. Unfortunately it didn’t help with the SWT issue - it still runs in compatibility mode :/.
Any ideas what to do?

Hi I do have a similar issue. I would like to know how to disable compatibility mode in IE8 browser. We are using Vaadin portlet in liferay. Vaadin version: 7.1.3. Liferay version 6.1.1.


Compatibility mode is per page, not portlet, and disabling it is done with a meta tag in the “head” section of the page. Thus, you need to do it on the portal page level, not in the Vaadin application/portlet.

A quick google search for “liferay disable ie compatibility mode” brings up e.g.
this blog post
(disclaimer: I didn’t check if it applies to the Liferay version you are using).

For Liferay 6.1.2 and later, see