0

I have my project deployed on iis 7.5. Now when I try to access it from any other machine in firefox ( in IE its seems to be working fine) , all the files are getting rendered (html, js) except the css files.

By going through the other posts, I have checked that the MIME type for .css files is there in my iis MIME settings.

I am including my css file in my head section as :

@Html.CssInclude("jquery.ui.core.css")

In the response header, I am getting -
Content-Type text/html; charset=utf-8

I am including my javascript files in the same way:

@Html.ScriptInclude("jquery-1.7.min.js")

But, in my response headers, I am getting
Content-Type application/x-javascript

I am not getting why is the behaviour different for css files.. Please help..

4

1 回答 1

0

这可能是编码问题。当您包含具有不同字符编码的文件时,浏览器可能会感到困惑。

检查源文件的编码并确保它们都相同。在 Windows 中最简单的方法是将它们保存为 ASCII(例如使用记事本)。

于 2012-09-20T13:27:15.670 回答