资源解释为样式表,但使用MIME类型text / javascript进行传输 [英] Resource interpreted as Stylesheet but transferred with MIME type text/javascript

查看:736
本文介绍了资源解释为样式表,但使用MIME类型text / javascript进行传输的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用MVC,Java Script,JQuery,Ajax创建应用程序。当我使用visual studio进行调试时,它的工作正常,没有任何脚本错误。之后,我在IIS服务器上托管我的应用程序,它显示控制台错误,我的应用程序样式不完美。我已附上以下错误。

I have Create application using MVC, Java Script, JQuery, Ajax. When I'm debug using visual studio It's work fine without any script errors. After that I'm host my application in IIS server, It's shows console error and my application styles are not working perfect. I have attached the error below.


错误:资源被解释为样式表,但使用MIME类型text / javascript传输:

Error : Resource interpreted as Stylesheet but transferred with MIME type text/javascript:

图片:

推荐答案

我遇到了完全相同的问题,导致我的HTML中的行以下列形式出现:

I had the exact same problem, cause by lines in my HTML in the following form:

<link rel="stylesheet" type="text/css" href="css/my_css_resource.css" />

当我删除 rel =stylesheet

这篇关于资源解释为样式表,但使用MIME类型text / javascript进行传输的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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