Preventing The IE6 CSS Background Flicker

Written by David Walsh on Wednesday, August 8, 2007


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.

%MINIFYHTMLa61f60fa7b521141fe8d3c49882073ff6%

Follow via RSS Epic Discussion

Commenter Avatar June 21 / #
Steve says:

You can do the same thing by using .htaccess to cache the file. I don’t know if there is a minimum cache offset but a day works. And if you are following the yslow guidelines you get this as an added benefit. The flicker is actually caused by IE revalidating the image. The advantage to this method beyond speeding up your site is it doesn’t require JavaScript to work.

Commenter Avatar April 01 / #
Addam says:

Awesome man! Thanks for sharing this.

Commenter Avatar September 10 / #

Thanks, this worked great! A simple solution to an annoying behavior.

Be Heard!

I want to hear what you have to say! Share your comments and questions below.

Name*:
Email*:
Website:  


© David Walsh 2007-2010. Contact David Walsh. Powered by the remarkable MooTools javascript framework.