Skip to the content...

Welcome to the David Walsh Blog. I'm a MooTools, Dojo, jQuery, CSS, and PHP Web Developer located in Madison, Wisconsin, United States. Please contact me if I can make your experience on my website better.

Preventing The IE6 CSS Background Flicker

4 Responses »

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.

%MINIFYHTMLdf670c5f245ff16cf766235e7ca7d4964%

Discussion

  1. steve
    June 21, 2008 @ 7:49 am

    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.

  2. April 1, 2009 @ 4:15 pm

    Awesome man! Thanks for sharing this.

  3. September 10, 2009 @ 9:04 am

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

  4. p
    June 21, 2010 @ 4:12 pm

    Hi,

    Where can I get the Javascript code to resolve the issue?

    regards,

    N

Be Heard!

Share your thoughts with fellow developers of all skill levels! I want to hear from you!

Name*:
Email*:
Website:  
Wrap your code with <code> tags, f00!