Skip to content Skip to sidebar Skip to footer

Adding A Meta Tag Via Jquery?

I need to add this meta-tag in the head section of the page as i need the page to force IE7. I am using DNN 5.6

Solution 1:

$('head').append('<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" /> ');

Though I'm not certain it will have an affect as it will be generated after the page is loaded

-- edit --

If you want to add meta data tags for page description, use the SETTINGS of your DNN page to add Description and Keywords. Beyond that, the best way to go when modifying the HEAD is to dynamically inject your code into the HEAD via a third party module.

Found at http://www.dotnetnuke.com/Resources/Forums/forumid/7/threadid/298385/scope/posts.aspx

This may allow other meta tags, if you're lucky

-- edit 2 --

Additional HEAD tags can be placed into Page Settings > Advanced Settings > Page Header Tags.

Found at http://www.dotnetnuke.com/Resources/Forums/forumid/-1/postid/223250/scope/posts.aspx


Solution 2:

There is really no use in adding <meta> headers after the page has loaded.

To force IE7 rendering, change the underlying HTML.


Post a Comment for "Adding A Meta Tag Via Jquery?"