PSD to HTML conversion PSD to HTML conversion PSD2HTML.com with over 300 professionals takes the designs to HTML and beyond

Code Snippet

Home » Code Snippets » JavaScript » Prevent Background Image Flickering in IE

Prevent Background Image Flickering in IE

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

Subscribe to The Thread

  1. i really like this blog, keep making!!

  2. Leonard Michael

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

    Example?

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

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

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

      Sub in the real brackets in the code

  3. saverio

    graet

  4. 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

Speak, my friend

At this moment, you have an awesome opportunity* to be the person your mother always wanted you to be: kind, helpful, and smart. Do that, and we'll give you a big ol' gold star for the day (literally).

Posting tips:
  • You can use basic HTML
  • When posting code, please turn all
    < characters into &lt;
  • If the code is multi-line, use
    <pre><code></code></pre>
Thank you,
~ The Management ~