Asp.net MVC 页面为图像文件提供 Mime 类型警告

发布于 2024-09-02 22:21:16 字数 290 浏览 2 评论 0原文

虽然我没有看到任何受此影响的功能或 jquery UI 元素,但当我访问我的 asp.net mvc 网页时,chrome 开发人员控制台会记录一堆错误消息,如下所示:

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

所有警告都是针对 jquery UI 图像的(尽管我没有任何自定义图像,所以我不知道它是否只是 jquery UI)。所有 jquery 图像仍然正确加载。

有谁知道为什么会发生这种情况?

While I do not see any functionally or jquery UI elements affected by this, but when I access my asp.net mvc web page the chrome developer console is logged with a bunch of error messages like so:

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

All of the warnings are for jquery UI images (though I don't have any custom images on there so I don't know if it's jquery UI only). All the jquery images still load correctly.

Does anyone have any insight on why this is happening?

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

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

发布评论

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

评论(1

玻璃人 2024-09-09 22:21:16

您是否通过 Visual Studio 的内置 Web 服务器运行您的网站?显然,您对该环境中的 MIME 类型没有太多控制权(请参阅此)。我看到了同样的行为,并开始对此感到紧张,最终意识到我什至没有查看 IIS 托管的应用程序。

Are you running your site from Visual Studio's built-in web server? Apparently, you don't have much control over the MIME types in that environment (see this). I was seeing the same behavior and was starting to stress about it before finally realizing that I wasn't even looking at the IIS-hosted application.

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