Developer's manual

Flickering images in Internet Explorer 6

A curse of modern web development

IE6 is plagued by a number of image-loading bugs; most notable is the one that causes some CSS background-images to flicker when you pass your mouse over them.

In the case of this menu, through various hacks and proprietary nonsense, the only images which are still affected are link image-backgrounds. If you use image backgrounds, and you're bothered by this problem, this article summarises some possible solutions.

Client-side solutions

Ryan Carver suggests a number of client-side solutions to this problem, and they work by placing arbitrary restrictions on the size, or other properties, of the element. Size is the major factor, and that's unfortunate when we're dealing with link backgrounds, because they're generally too small for any of these solutions to work.

Petr Stanícek [aka -pixy-] has the most robust alternative I've seen, which involves dividing the background states between two different elements. Unfortunately in this case, that's not suitable either; it's not possible to share the states between a link and its parent list-item, because the two elements are not [necessarily] directly on top of each other.

Apache solutions

Dean Edwards has come up with an Apache configuration change that completely solves the problem. I've tested it on my local server, and it works :-) It uses the Apache module mod_expires to control image caching for Internet Explorer, so if you can enable this module and make the necessary additions to your .htaccess file (documented in the article linked above) this is probably the best thing to do.

IIS solutions

For IIS the problem should be solveable in a similar way, by taking control of image caching using the Cache-Control Extensions. I'm not in a position to test this personally, but I have it on very good authority that it works.


We would like your feedback! Take the UDM4 Survey!

UDM 4 is valid XHTML, and in our judgement, meets the criteria for WAI Triple-A conformance.