Jan Mészáros reflections on technology and society

12Mar/1011

IE8 CSS background flickering

Combination of white content on a black background causes an uncomfortable flickering or flashing in Internet Explorer 8. I resolved this problem adding following lines of code into head of XHTML page:

  1. <meta http-equiv="Page-Enter" content="blendTrans(Duration=.01)" />
  2. <meta http-equiv="Page-Exit" content="blendTrans(Duration=.01)" />
  3.  
  4. <script language="javascript" type="text/javascript">
  5.     try
  6.     {
  7.         document.execCommand("BackgroundImageCache", false, true);
  8.     }
  9.     catch(err) {}
  10. </script>
Tagged as: , Leave a comment
Comments (11) Trackbacks (0)
  1. i don’t know how, but IT WORKS!
    thank you so much ^^

  2. Thanks! it works

  3. Thanks, works for me too.

  4. awesome fix, it gets rid of the window flashing white, but im getting a nasty little FOUC on some tab images on the page….

  5. changed

    to

    still seems to work and got rid of the FOUC. man i hate IE.

  6. Thankyou sooooooooooo much!! Tried a heap of things but finally this works.

  7. I love you mate. It WORKS!!!!!!!!!!

  8. It doesn’t seem to work on win7 with IE8, it works on all browser on Vista though…

    Any idea’s?

  9. Arrgg… I need to see Kane’s comment (22-Apr-2010 21:43), but your comment processor seems to have stripped out his code!

    I’m having the same thing. Adding this code fixes the flickering issue, but creates a flash of unstyled content.

  10. Thanks so much! Spent over an hour looking for a solution. Several meta hacks and javascript hacks are littered all over the internets, but this is the only one that worked for me. Thanks again!

  11. HI John!

    Good work, You saved me.


Leave a comment

(required)

No trackbacks yet.