I'm justing sorting and optimizing my Magento 1.5.1.0 theme and I'm asking myself, for what purpose this code snippet is and whether I can safely remove it.
Talking about this one:
<!--[if lt IE 7]>
<script type="text/javascript">
//<![CDATA[
var BLANK_URL = '<?php echo $this->helper('core/js')->getJsUrl('blank.html') ?>';
var BLANK_IMG = '<?php echo $this->helper('core/js')->getJsUrl('spacer.gif') ?>';
//]]>
</script>
<![endif]-->
Any advice is appreciated. Thanks!
BLANK_URL
is part of a IE6 fix, to make the browser show iframe
backgrounds transparently, when being hovered.
BLANK_IMG
is part of another IE6 fix, to make the browser show PNG images correctly, when used as background images.
Whether you can remove them, solely depends on which browsers you want to support.
If you want to remove them, be aware though, that you also should remove the proper .js includes, iehover-fix.js
for BLANK_URL
and/or ds-sleight.js
for BLANK_IMG
, too.
<!--[if lt IE 7]>
<script type="text/javascript" src="http://example.com/js/lib/ds-sleight.js"></script>
<script type="text/javascript" src="http://example.com/js/varien/iehover-fix.js"></script>
<![endif]-->
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With