Created
December 26, 2010 17:22
-
-
Save chicagoworks/755521 to your computer and use it in GitHub Desktop.
Fix flicker of background images in IE
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//==== Fix flicker of background images in IE | |
//http://ajaxian.com/archives/no-more-ie6-background-flicker | |
//http://support.microsoft.com/?scid=kb;en-us;823727&spid=2073&sid=global | |
//http://www.adobe.com/cfusion/communityengine/index.cfm?event=showdetails&productId=1&postId=1104 | |
//Executes proprietary command to force IE to cache all background images which prevents the browser from fetching the same image repeatedly when using CSS hover background repositioning | |
if($.browser.msie && parseInt($.browser.version) === 6) { | |
try { | |
document.execCommand("BackgroundImageCache",false,true); | |
} catch(e) { | |
// just in case | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment