⬆️ ⬇️

Eliminate the blinking of background images in IE6

Often, at the stage of testing the site in different browsers, we had to deal with the unpleasant effect of “flashing” background images in IE6, which manifests itself when the cursor hovers over a link, which is a block element. Blinking occurs because the browser reloads all background images from the server.



To eliminate the flashing, you need to connect a small JavaScript code to the web page:

var m = document.uniqueID

&& document.compatMode

&& !window.XMLHttpRequest

&& document.execCommand;



try{

if(!!m)

{

m("BackgroundImageCache", false, true)

}

}

catch(oh){};



')

Source: https://habr.com/ru/post/18506/



All Articles