Preventing The IE6 CSS Background Flicker
One of the nagging issues that Internet Explorer creates is a flicker on anchor tag background images. Did you know, however, that there is a quick and easy way to prevent that problem using a little bit of javascript? Simply place the following javascript code in the header section of your website, refresh the page, and bid adieu to another IE6 issue.
<script type="text/javascript">
try { document.execCommand('BackgroundImageCache', false, true); } catch(e) {}
</script>
This script cache's the background in IE6 to prevent a flicker and other browsers ignore the code.
Reference:
- Login or register to post comments
- 1371 reads
- Flag as offensive
- Email this Story
- Printer-friendly version
(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)






