加载我的页面时,我收到此警告:
Resource interpreted as Image but transferred with MIME type application/octet-stream
我的页面正在加载jpeg图片。服务器将图像字节写入输出流并将其发送到客户端。
我该怎么做才能阻止此警告?
答案 0 :(得分:2)
您必须设置正确的Mime类型
为图像设置正确的Content-Type
http标头
例如,jpeg图像将具有Content-Type: image/jpeg