Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Magento: Cleaning up my themes, removing blank.html

Tags:

html

magento

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!

like image 291
Marek123 Avatar asked Feb 23 '23 05:02

Marek123


1 Answers

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]-->
like image 111
Jürgen Thelen Avatar answered Mar 06 '23 10:03

Jürgen Thelen