开发者

IE png fix not calling from static domain when using relative path

开发者 https://www.devze.com 2023-01-15 18:47 出处:网络
All my static media is on a subdomain static.domain.com while the rest of the code is on www.domain.com.

All my static media is on a subdomain static.domain.com while the rest of the code is on www.domain.com.

I am trying to apply the pngfix for IE and I noticed via fiddler that there are several requests to www.domain.com rather开发者_如何学JAVA than static and these are all getting 404 and causing insane page load times. I swapped out the relative path to the image for an absolute path and it works.

The css and js are both on static.domain com. I've been banging my head on this for a while. I'm using an addClass() in jQuery to apply the style. All the other images show up. What's going on?

Doesn't work(relative)

.wwTxtQimage {
    font-size: 10pt !important;
    background-color: transparent;
    filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=scale, src='/images/wall/back.png?v=0') !important;
    zoom: 1;
    padding: 5px;
}

Works when absolute

.wwTxtQimage {
    font-size: 10pt !important;
    background-color: transparent;
    filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=scale, src='http://static.domain.com/images/wall/back.png?v=0') !important;
    zoom: 1;
    padding: 5px;
}


I can't remember exactly how pngfix works; but doesn't it involve injecting something to the DOM; meaning that as part of the HTML content that / would then be relative to the page rather than the stylesheet?

I think you'll probably just have to use absolute paths for the filter values if you want to store then stylesheets on a separate subdomain.

0

精彩评论

暂无评论...
验证码 换一张
取 消