Grow your CSS skills. Land your dream job.

Last updated on:

Prevent Background Image Flickering in IE

try {
 document.execCommand("BackgroundImageCache", false, true);
} catch(err) {}

Comments

  1. paul
    Permalink to comment#

    i really like this blog, keep making!!

  2. Leonard Michael

    Silly question perhaps, but how do you use/implement this?

    Example?

    • Permalink to comment#

      I believe you just put it in your head, like this:

      try {
      document.execCommand(“BackgroundImageCache”, false, true);
      } catch(err) {}

    • Permalink to comment#

      [script type="javascript"]
      try {
      document.execCommand(“BackgroundImageCache”, false, true);
      } catch(err) {}
      [/script]

      Sub in the real brackets in the code

  3. saverio

    graet

  4. sujji
    Permalink to comment#

    hi,
    i used the above code . but still i am facing image flickering. i have to place the names of the images in the place of BackgroundImageCache. please help me

Leave a Comment

Current day month ye@r *

*May or may not contain any actual "CSS" or "Tricks".