什么可能导致 Internet Explorer 6 中图像加载间歇性问题?

发布于 2024-07-06 08:54:46 字数 613 浏览 5 评论 0原文

我正在处理的网站遇到问题,图像和背景图像无法在 Internet Explorer 6 中加载。

以下是您可能会遇到此问题的页面示例:

示例页面

到目前为止,我已经研究了以下可能的问题并几乎排除了它们:

  • XML/Extraneous图像文件中的数据(google photoshop 7 internet explorer)
  • 损坏的图像文件

我没有排除无效标记的可能性。

我注意到大多数报告此问题的页面都存在验证错误,我正在努力在适当的地方修复这些错误。

我看到的行为是页面将加载并且除背景图像之外的所有元素都会呈现。 没有抛出 JavaScript 错误。 使用 Fiddler 时,不会发出对图像的请求。 如果浏览器直接指向背景图像,缓存将被清除,然后浏览器指向 HTML 页面,背景图像将加载到 HTML 页面内。

有没有人对解决此问题的方法有任何其他建议?

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.

Here is an example of a page on which you might experience this issue:

Example Page

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

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.

Does anyone have any additional suggestions for ways to attack this issue?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

段念尘 2024-07-13 08:54:46

我曾经两次遇到过照片无法显示的问题,这是因为它们的色彩空间不正确,使用的是 CMYK 而不是 RGB。

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.

优雅的叶子 2024-07-13 08:54:46

这是 IE6 的一个奇怪问题。 我只需右键单击图像并选择“显示图片”,然后图像就会正确加载。

this is a weird issue with IE6. I just right click on the image and select "Show Picture" then the image loads properly.

沩ん囻菔务 2024-07-13 08:54:46

我正在 IE6 中查看此问题并尝试复制该问题,但我似乎无法让它发生 - 它似乎总是加载。

关于要尝试的事情的一些想法,因为似乎还有另外两个类被背景覆盖,那就是尝试在后台分配之后添加 !important ,所以:

div.gBodyContainer {
background-image:url(/etc/medialib/europe/about_infiniti/environment.Par.7366.Image.964.992.direct.jpg); !important
}

另一件要尝试的事情是摆脱所有 . 在文件名中并减少它的长度,应该不重要,但它可能会导致一些问题,无论如何尝试一下也没有什么坏处。

您可以尝试的另一件事是让 gBodyContainer 成为一个 ID 而不是一个类,或者给它一个 ID 和一个类,并将背景分配给该 ID。 再说一次,这应该不重要,但是尝试一下看看它是否有效也没什么坏处,IE6 做了很多有趣的事情。

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.

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:

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.

一个人练习一个人 2024-07-13 08:54:46

难道只有ie6没有ie7吗? 有时 IE 对 html 的要求相当严格,而 Firefox 则可以让你摆脱更多的束缚。 不确定这是否有帮助,但我只是通过慢慢删除内容来调试奇怪的 IE6/7 错误。 但如果它只是间歇性的,就像相同的代码打开和关闭时发生的那样,那就真的很奇怪了。

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.

野の 2024-07-13 08:54:46

问题是“IE6”部分;-)

The problem is the "IE6" part ;-)

梦旅人picnic 2024-07-13 08:54:46

我认为在某些情况下,您可以通过在请求之前加载全尺寸图像并使用样式 display: none; 隐藏它来解决此问题,以便 IE6 将从缓存加载图像。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文