图像无法在IE中加载DOM:7009错误(无法解码)在控制台中 [英] Images failing to load in IE with DOM: 7009 error (unable to decode) in console

查看:2541
本文介绍了图像无法在IE中加载DOM:7009错误(无法解码)在控制台中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在IE中单个页面上加载多个图像(在IE11中复制),其中一些图像开始无法加载,并且在控制台中具有类似于以下警告的信息:

When loading many images on a single page in IE (reproduced in IE11), some of them begin to fail to load, and have something similar to the following warning in the console:


DOM7009:无法在URL上解码图像:'[some unique url]'。

DOM7009: Unable to decode image at URL: '[some unique url]'.

当我查看网络流量时,会出现从服务器收到的每个这些图像的有效响应。每次都不总是相同的图像。如果我使用开发工具强制图像重新加载(例如:我更新url以包含一些无关的url参数& test = 1),它会正常加载/呈现而不会出错。我已经用不同类型的图像(jpegs / pngs;示例png包含在下面)中再现了这种行为。随着图像数量的增加,似乎会更频繁地发生,也可能与每个图像的大小有一些相关性。

When I look at the network traffic, there does appear to valid responses received for each of these images from the server. It's not always the same images each time. If I use the dev tools to force the image to reload (example: I update the url to include some some extraneous url parameter "&test=1"), it loads/renders normally without error. I've reproduced this behavior with different types of images (jpegs/pngs; example png included below). It seems to happen more frequently as the number of images go up, and may also have some correlation with the size of each image.

关于什么可能导致的任何想法这个?潜在的工作?任何帮助都不胜感激。

Any thoughts as to what might be causing this? Potential work-arounds? Any help is appreciated.

推荐答案

我有一个类似的问题,其中HTTP头中的文件被报告为JPEG,但实际上是一个PNG。更改文件类型以匹配文件或删除X内容类型选项标题来解决问题。

I had a similar problem where a file was reported in the HTTP headers as a JPEG but was in fact a PNG. Changing the filetype to match the file or removing the "X-Content-Type-Options" header fixed the problem.

这篇关于图像无法在IE中加载DOM:7009错误(无法解码)在控制台中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆