Skip to content

Instantly share code, notes, and snippets.

@mimetaur
Created March 27, 2010 21:00
Show Gist options
  • Save mimetaur/346350 to your computer and use it in GitHub Desktop.
Save mimetaur/346350 to your computer and use it in GitHub Desktop.
IE6 Flicker Fix
function ie6FlickerFix() {
try {
document.execCommand("BackgroundImageCache", false, true);
} catch(err) {}
}
var addLoadEvent = function(func) {
var oldonload = window.onload;
if (typeof window.onload != 'function') {
window.onload = func;
} else {
window.onload = function() {
if (oldonload) {
oldonload();
}
func();
};
}
};
addLoadEvent(ie6FlickerFix);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment