Lack of interest Remove the X-UA-Compatible meta tag and use a server header, or htaccess instead

This suggestion has been closed automatically because it did not receive enough votes over an extended period of time. If you wish to see this, please search for an open suggestion and, if you don't find any, post a new one.

Rob

Well-known member
Ok, this isnt the biggest optimisation in the world but it avoids serving that IE only compatability tag to all users.

It can be dropped from the styles, and instead a simple bit of PHP can sent it as a server header:-

PHP:
if (isset($_SERVER['HTTP_USER_AGENT']) &&
   (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false))
       header('X-UA-Compatible: IE=edge,chrome=1');

Or you could add it to the .htaccess file:-
Code:
<FilesMatch "\.(htm|html|php)$">
   <IfModule mod_headers.c>
        BrowserMatch MSIE ie
       Header set X-UA-Compatible "IE=Edge,chrome=1" env=ie
   </IfModule>
</FilesMatch>

This will save some bytes for anyone not using IE, but also bring us a step closer to w3c validation.
 
Upvote 2
This suggestion has been closed. Votes are no longer accepted.
Top Bottom