用于PNG图像的chrome中的MIME类型警告 [英] MIME type warning in chrome for png images

查看:332
本文介绍了用于PNG图像的chrome中的MIME类型警告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



 资源解释为图像,但用MIME类型application / octet-stream传输。 

以前见过这个吗?



解决方案

使用ASP.NET开发服务器运行ASP.NET WebForms应用程序时遇到此问题。
$ b

我怀疑类似的情况也会发生,如果您使用IIS Express作为您的服务器(VS 2010 SP1)。



我的问题在本地通过编辑项目设置(在Web下)并从ASP.NET开发服务器更改为本地计算机上的IIS。我可以看到,PNG已经被正确定义为图像MIME类型,实际上,当我点击我的本地IIS服务器时,它将以正确的类型提供文件。


Just ran my site in chrome and suprisingly it comes up with this warning for each of my .png images:

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

Anyone seen this before?

Regards

解决方案

I encountered this while running an ASP.NET WebForms app using the ASP.NET Development Server.

I suspect something similar will happen if you use IIS Express as your server as well (VS 2010 SP1).

I 'resolved' my problem locally by editing the project settings (under Web) and changed from the ASP.NET Development Server to IIS on my local machine. I can see that PNG was already defined correctly as an image MIME type and indeed when I hit my local IIS server it's serving up the file with the correct type.

这篇关于用于PNG图像的chrome中的MIME类型警告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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