Topic on Project:Support desk/Flow

Adding <meta> tag as the first <meta> tag in <head> in all pages

2
194.248.0.190 (talkcontribs)

Hi,

I am working on resolving a bug in Mathjax(www.mathjax.org) that I use inside mediawiki. Using Internet explorer 8 mathjax renders some math markup wrong. The fix for this issue is to force IE 8 to use IE 7 rendering mode via a meta tag. I managed to add the meta tag to the head element by doing this:

$out->addHeadItem('Meta',' <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7">');

The problem is that this puts in to the bottom of <head>. Is it possible to put it as first in the list of <meta> tags? This must be the first <meta> in order to make it work.

IAlex (talkcontribs)

You can use $out->addMeta( 'http:X-UA-Compatible', 'IE=EmulateIE7' ); but it will be added at the end of the <meta> list. If you want to add it at the top, you will need to hack includes/OutputPage.php.

Reply to "Adding <meta> tag as the first <meta> tag in <head> in all pages"