Solution 1: IE6 Hack script
Copy codeThe Code is as follows: <script>
If (navigator. appName = "Microsoft Internet Explorer "){
Var B _version = navigator. appVersion;
Var version = B _version.split (";");
Var trim_Version = version [1]. replace (/[]/g ,"");
If (trim_Version = "MSIE6.0 "){
; // Alert ("Internet Explorer 6.0 ");
Try {
Document.exe cCommand ("BackgroundImageCache", false, fix );
} Catch (err ){}
}
}
</Script>
Solution 2: IE6 Hack commentCopy codeThe Code is as follows: <! -- [If IE 6]>
<Script type = "text/javascript"> <! --
Document.exe cCommand ("BackgroundImageCache", false, true );
// --> </Script>
<! [Endif] -->
Solution 3: IE6 Hack StyleCopy codeThe Code is as follows: html {}
{
Filter: expression(document.exe cCommand ("BackgroundImageCache", false, true ));
}
But the above method can not solve the problem of using images in innerHTML without caching, the problem of Microsoft official explanation reference: http://support.microsoft.com/default.aspx? Scid = kb; en-us; 319546
To solve the problem of background image caching, you can use CSS background-image for definition and cache for only one access. For IMG tags, some websites use a GIF image of 1 pixel (both width and height) as the SRC value, indicating that the content is defined by style classes, for example:Copy codeThe Code is as follows:. yahoo
{
Background: url ('img/yahoo.png ') no-repeat;
Width: 16px;
Height: 16px;
}
When using images in Web applications, you need to consider the number of image requests, image size, and image definition.