gpt4 book ai didi

google-chrome - Chrome 说 "Resource interpreted as script but transferred with MIME type text/plain.",什么给出了?

转载 作者:行者123 更新时间:2023-12-03 04:00:19 28 4
gpt4 key购买 nike

在 FF 中,我的 javascript 工作正常。但在 Chrome 中它给出了这样的消息:

Resource interpreted as script but transferred with MIME type text/plain.

我已经检查了所有脚本标记,它们都有 MIME type="text/javascript"。甚至 jquery 和 jquery ui 也是如此。 Chrome 出了什么问题?

有什么问题以及解决办法吗?我是否必须在浏览器的“选项”中更改某些内容,或者是否来自服务器,或者我是否必须调整我的代码?

最佳答案

这意味着服务器正在发送 Javascript HTTP 响应

Content-Type: text/plain

您需要配置服务器以发送 JavaScript 响应

Content-Type: application/javascript

关于google-chrome - Chrome 说 "Resource interpreted as script but transferred with MIME type text/plain.",什么给出了?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3467404/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com