admin管理员组文章数量:1023242
I have a error when the file .js is loaded, but this error ocurred in all browsers, I try clean the file .js but the error is not in the code, I discovered this error is in header, but I no have idea to how fix this. This erro ocurred only in a view of list of SharePoint 2013.
Error:
Refused to execute script form 'url/.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
I have a error when the file .js is loaded, but this error ocurred in all browsers, I try clean the file .js but the error is not in the code, I discovered this error is in header, but I no have idea to how fix this. This erro ocurred only in a view of list of SharePoint 2013.
Error:
Refused to execute script form 'url/.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
Share Improve this question asked Nov 19, 2013 at 10:57 Diego HillesheimDiego Hillesheim 1651 gold badge2 silver badges11 bronze badges 1- But the error not ocurred in all puters... – Diego Hillesheim Commented Nov 19, 2013 at 11:17
2 Answers
Reset to default 2There has been a recent change to at least the Chromium platform to enforce strict MIME type checking. When my Chrome browser updated, my web site suddenly started failing because I had not properly set the MIME types of .js files. Setting the MIME type properly on the server fixed my issue.
The insidious part of this, at least for me, is that there were no warning messages in the browser console when this occurs - my JavaScript will just silently fail to execute.
If you can discover which .js file in your SharePoint distribution is causing the problem, and set it's MIME type properly, that should fix the issue. Might also be a server configuration setting somewhere in the bowels of SharePoint administration.
I had this problem before (because of copying files from different site) and solved by checking out and checking in the files
I have a error when the file .js is loaded, but this error ocurred in all browsers, I try clean the file .js but the error is not in the code, I discovered this error is in header, but I no have idea to how fix this. This erro ocurred only in a view of list of SharePoint 2013.
Error:
Refused to execute script form 'url/.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
I have a error when the file .js is loaded, but this error ocurred in all browsers, I try clean the file .js but the error is not in the code, I discovered this error is in header, but I no have idea to how fix this. This erro ocurred only in a view of list of SharePoint 2013.
Error:
Refused to execute script form 'url/.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
Share Improve this question asked Nov 19, 2013 at 10:57 Diego HillesheimDiego Hillesheim 1651 gold badge2 silver badges11 bronze badges 1- But the error not ocurred in all puters... – Diego Hillesheim Commented Nov 19, 2013 at 11:17
2 Answers
Reset to default 2There has been a recent change to at least the Chromium platform to enforce strict MIME type checking. When my Chrome browser updated, my web site suddenly started failing because I had not properly set the MIME types of .js files. Setting the MIME type properly on the server fixed my issue.
The insidious part of this, at least for me, is that there were no warning messages in the browser console when this occurs - my JavaScript will just silently fail to execute.
If you can discover which .js file in your SharePoint distribution is causing the problem, and set it's MIME type properly, that should fix the issue. Might also be a server configuration setting somewhere in the bowels of SharePoint administration.
I had this problem before (because of copying files from different site) and solved by checking out and checking in the files
本文标签: javascriptMIME type error with js in all browser in a view of SharePoint 2013Stack Overflow
版权声明:本文标题:javascript - MIME type error with .js in all browser in a view of SharePoint 2013 - Stack Overflow 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://it.en369.cn/questions/1745520417a2154290.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论