Over a million developers have joined DZone.

Preventing The IE6 CSS Background Flicker

· Web Dev Zone

Start coding today to experience the powerful engine that drives data application’s development, brought to you in partnership with Qlik.

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.

Create data driven applications in Qlik’s free and easy to use coding environment, brought to you in partnership with Qlik.

Topics:

Published at DZone with permission of David Walsh. See the original article here.

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

SEE AN EXAMPLE
Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.
Subscribe

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}