Chrome says “Resource interpreted as script but transferred with MIME type text/plain.”, what gives?

后端 未结 20 2539
眼角桃花
眼角桃花 2020-11-22 07:21

In FF and all, my javascript works fine. But in Chrome it gives this message:

Resource interpreted as script but transferred with MIME type text/plai

20条回答
  •  春和景丽
    2020-11-22 07:55

    I had this problem and I figured out how to fix it.

    It happens when the style (CSS) file is in a different encoding from the PHP file that references the .css file

    For example, using jQuery.js in Unix encoding and using index.php in UTF-8 will cause this problem so you have to make them both UTF-8 or any other encoding as long as it the same.

提交回复
热议问题