Skip to content
Snippets Groups Projects
Commit 427bf9a2 authored by Andreas Gohr's avatar Andreas Gohr
Browse files

do not deliver scripts to ie<9 fixes #1816

All script tags are now surrounded by conditional comments to tell
Internet Explorer 8 and lower to not even bother trying to load the
JavaScript.
parent 65a6bb07
No related branches found
No related tags found
No related merge requests found
......@@ -445,6 +445,9 @@ function tpl_metaheaders($alt = true) {
*/
function _tpl_metaheaders_action($data) {
foreach($data as $tag => $inst) {
if($tag == 'script') {
echo "<!--[if gte IE 9]><!-->\n"; // no scripts for old IE
}
foreach($inst as $attr) {
echo '<', $tag, ' ', buildAttributes($attr);
if(isset($attr['_data']) || $tag == 'script') {
......@@ -459,6 +462,9 @@ function _tpl_metaheaders_action($data) {
}
echo "\n";
}
if($tag == 'script') {
echo "<!--<![endif]-->\n";
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment