0

加载我的页面时,我收到以下警告:

Resource interpreted as Image but transferred with MIME type application/octet-stream

我的页面正在加载 jpeg 图像。服务器将图像字节写入输出流,然后将其发送给客户端。

我该怎么做才能防止出现此警告?

4

1 回答 1

2

您必须设置正确的 Mime 类型。
为图像设置正确的Content-Typehttp 标头。
例如,一个 jpeg 图像将具有Content-Type: image/jpeg

于 2013-08-22T12:37:49.323 回答