I am having issues with a website that I am working on in which images and background-images fail to load in Internet Explorer 6.
我正在处理我正在处理的网站问题,其中图像和背景图像无法在Internet Explorer 6中加载。
Here is an example of a page on which you might experience this issue:
以下是您可能遇到此问题的页面示例:
So far I have looked at the following possible issues and pretty much ruled them out:
到目前为止,我已经研究了以下可能的问题并且几乎排除了它们:
- XML/Extraneous data in the image files (google photoshop 7 internet explorer)
- Corrupt image files
图像文件中的XML /无关数据(google photoshop 7 Internet Explorer)
损坏的图像文件
I have not ruled out invalid markup.
我没有排除无效标记。
I have noticed that there are validation errors in most of the pages where this problem has been reported and I am working on getting those fixed where appropriate.
我注意到在报告此问题的大多数页面中存在验证错误,我正在努力在适当的地方修复这些问题。
The behavior I see is that the page will load and all elements other than the background image render. There are no javascript errors thrown. When using Fiddler, no request for the image is made. If the browser is pointed directly to the background-image, the cache is cleared and then the browser is pointed back at the HTML page, the background-image will load inside the HTML page.
我看到的行为是页面将加载,并且除了背景图像之外的所有元素都会呈现。没有抛出javascript错误。使用Fiddler时,不会对图像发出请求。如果浏览器直接指向背景图像,则清除缓存,然后将浏览器指向HTML页面,背景图像将加载到HTML页面内。
Does anyone have any additional suggestions for ways to attack this issue?
有没有人对攻击此问题的方法有任何其他建议?
6 个解决方案
#1
1
Twice now I've had people have problems with photos not showing up, and it was because they were in an incorrect colorspace, using CMYK instead of RGB.
现在两次我有人没有出现照片的问题,这是因为他们使用CMYK而不是RGB的色彩空间不正确。
#2
1
this is a weird issue with IE6. I just right click on the image and select "Show Picture" then the image loads properly.
这是IE6的一个奇怪问题。我只需右键单击图像并选择“显示图片”,然后图像正确加载。
#3
1
I'm looking at this in IE6 and trying to replicate the problem, but I can't seem to get it to happen - it always seems to load.
我在IE6中看到这个并尝试复制问题,但我似乎无法让它发生 - 它总是似乎加载。
Some thoughts on things to try though as there appears to be another two classes that the background is over-riding is to try adding !important after the background assignment, so:
关于要尝试的事情的一些想法,因为看起来有另外两个背景重叠的类是在背景分配后尝试添加!important,所以:
div.gBodyContainer {
background-image:url(/etc/medialib/europe/about_infiniti/environment.Par.7366.Image.964.992.direct.jpg); !important
}
Another thing to try is getting rid of all the . in the filename and cut down the length of it, shouldn't matter, but it may be causing some problems, doesn't hurt to try it anyway.
另一件要尝试的是摆脱所有的。在文件名中减少它的长度,应该没关系,但它可能会造成一些问题,反正尝试也不会受到伤害。
The other thing you could try is making gBodyContainer an ID instead of a class, or give it an ID as well as a class and assign the background to the ID. Again, it shouldn't matter, but it doesn't hurt to try and see if it works, IE6 does a lot of funny things.
你可以尝试的另一件事是让gBodyContainer成为一个ID而不是一个类,或者给它一个ID和一个类,并将背景分配给ID。再次,它应该没关系,但尝试看看它是否有效并没有什么坏处,IE6做了很多有趣的事情。
#4
0
is it only ie6 and not ie7 too? IE is pretty strict with html sometimes, versus firefox lets you get away with more. Not sure if this helps, but I just debugged weird IE6/7 bugs by slowly taking away content. But if it's only intermittent, as in happens with the same code on and off, that's a really weird one.
它只是ie6而不是ie7吗? IE有时候对html非常严格,而firefox可以让你获得更多。不确定这是否有帮助,但我只是通过慢慢删除内容调试了奇怪的IE6 / 7错误。但是,如果它只是断断续续的,就像开启和关闭相同的代码一样,这是一个非常奇怪的。
#5
0
The problem is the "IE6" part ;-)
问题是“IE6”部分;-)
#6
0
I think in some cases you could solve this issue by loading the full size image before the request and hide it with style display: none;
so IE6 will load the image from cache.
我认为在某些情况下,您可以通过在请求之前加载完整大小的图像来解决此问题,并使用样式display:none;所以IE6将从缓存加载图像。
#1
1
Twice now I've had people have problems with photos not showing up, and it was because they were in an incorrect colorspace, using CMYK instead of RGB.
现在两次我有人没有出现照片的问题,这是因为他们使用CMYK而不是RGB的色彩空间不正确。
#2
1
this is a weird issue with IE6. I just right click on the image and select "Show Picture" then the image loads properly.
这是IE6的一个奇怪问题。我只需右键单击图像并选择“显示图片”,然后图像正确加载。
#3
1
I'm looking at this in IE6 and trying to replicate the problem, but I can't seem to get it to happen - it always seems to load.
我在IE6中看到这个并尝试复制问题,但我似乎无法让它发生 - 它总是似乎加载。
Some thoughts on things to try though as there appears to be another two classes that the background is over-riding is to try adding !important after the background assignment, so:
关于要尝试的事情的一些想法,因为看起来有另外两个背景重叠的类是在背景分配后尝试添加!important,所以:
div.gBodyContainer {
background-image:url(/etc/medialib/europe/about_infiniti/environment.Par.7366.Image.964.992.direct.jpg); !important
}
Another thing to try is getting rid of all the . in the filename and cut down the length of it, shouldn't matter, but it may be causing some problems, doesn't hurt to try it anyway.
另一件要尝试的是摆脱所有的。在文件名中减少它的长度,应该没关系,但它可能会造成一些问题,反正尝试也不会受到伤害。
The other thing you could try is making gBodyContainer an ID instead of a class, or give it an ID as well as a class and assign the background to the ID. Again, it shouldn't matter, but it doesn't hurt to try and see if it works, IE6 does a lot of funny things.
你可以尝试的另一件事是让gBodyContainer成为一个ID而不是一个类,或者给它一个ID和一个类,并将背景分配给ID。再次,它应该没关系,但尝试看看它是否有效并没有什么坏处,IE6做了很多有趣的事情。
#4
0
is it only ie6 and not ie7 too? IE is pretty strict with html sometimes, versus firefox lets you get away with more. Not sure if this helps, but I just debugged weird IE6/7 bugs by slowly taking away content. But if it's only intermittent, as in happens with the same code on and off, that's a really weird one.
它只是ie6而不是ie7吗? IE有时候对html非常严格,而firefox可以让你获得更多。不确定这是否有帮助,但我只是通过慢慢删除内容调试了奇怪的IE6 / 7错误。但是,如果它只是断断续续的,就像开启和关闭相同的代码一样,这是一个非常奇怪的。
#5
0
The problem is the "IE6" part ;-)
问题是“IE6”部分;-)
#6
0
I think in some cases you could solve this issue by loading the full size image before the request and hide it with style display: none;
so IE6 will load the image from cache.
我认为在某些情况下,您可以通过在请求之前加载完整大小的图像来解决此问题,并使用样式display:none;所以IE6将从缓存加载图像。