Wednesday, March 25, 2009

IE6 and GET /none HTTP/1.1

If you are using a script to get transparent pngs to work on IE6 there may be a flaw in your script.

Go here for a test and use fiddler to check for requests for none

:png problem for ie6

Here is the fix

</style>

<!--[if IE 6]>

<style>

img {

behavior: expression(

this.pngSet?

this.pngSet=true :

(this.nodeName == "IMG" ?

(this.src.toLowerCase().indexOf('.png')>-1 ?

(this.runtimeStyle.backgroundImage = "none", 
this.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" 
+ this.src + "', sizingMethod='image')",

this.src = "blank.gif") :

'') :         

(this.currentStyle.backgroundImage.toLowerCase().indexOf('.png')>-1) ?

(this.origBg = (this.origBg) ?

this.origBg :            

this.currentStyle.backgroundImage.toString().replace('url("','').replace('")',''),

this.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"
 + this.origBg + 
"', sizingMethod='crop')",

this.runtimeStyle.backgroundImage = "none") :

''

), this.pngSet=true

);

}

</style>

<![endif]-->