Why is the site http://skb.sfolt.ru/ shown by default in Standard mode, and http://milliommetr.ru/miko7 in compatibility mode? How to make so that all users in the transition to this site was Standard mode? If it's a doctype, I checked all the pages on the site, there is a doctype everywhere.

    2 answers 2

    Use the following tag:

    <meta http-equiv="X-UA-Compatible" content="IE=edge" /> 

    If possible, instead of edge, specify a specific version of IE. For example, 8 or 10.
    Use edge with caution, because:

    Web developers are advised to use this mode only on test pages. Unpredictable results are possible when rendering the page content in future versions of Windows Internet Explorer.

    In addition, if the user has compatibility mode enabled by default, then this tag will not work. You will need to use special headers.

    using php

     <?php header('X-UA-Compatible: IE=edge'); ?> 

    or using .htaccess (used in HTML5 Boilerplate )

     <IfModule mod_headers.c> Header set X-UA-Compatible "IE=Edge,chrome=1" # mod_headers can't match by content-type, but we don't want to send this header on *everything*... <FilesMatch "\.(appcache|crx|css|eot|gif|htc|ico|jpe?g|js|m4a|m4v|manifest|mp4|oex|oga|ogg|ogv|otf|pdf|png|safariextz|svg|svgz|ttf|vcf|webm|webp|woff|xml|xpi)$"> Header unset X-UA-Compatible </FilesMatch> </IfModule> 

    Question: Why can IE go to "compatibility mode" on my site?
    Answer: There are several reasons for this.

    • Previously, when viewing the site, the button "viewing in compatibility mode" was pressed;
    • the switching occurred automatically due to some content that caused the IE renderer error and forced it to roll back to the old version of the renderer;
    • compatibility mode was enabled by default for all sites;
    • IE counted the site as part of your intranet and switched to compatibility mode;
    • The site is listed by Microsoft as a site that requires the inclusion of compatibility mode;
    • And what can be connected with the fact that on the first site we did not specify these things, and there the desired mode is the default? - clevermasha
    • @clevermasha, I described the possible reasons - VenZell

    Here is a detailed diagram of the interaction between IE and the document mode: