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:-
Or you could add it to the .htaccess file:-
This will save some bytes for anyone not using IE, but also bring us a step closer to w3c validation.
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