Fix flashing background images in IE6
Often, at the stage of testing a site in different browsers, I had to deal with the unpleasant effect of “blinking” background images in IE6, which manifests itself when you hover over a link that is a block element. Blinking occurs due to the fact that the browser reboots all background images from the server.
To eliminate blinking, you need to connect a small JavaScript code to the web page:
To eliminate blinking, 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){};