Refused to apply style from '.../bootstrap.min.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.


在頁面引入了bootstrap:

但是控制台報錯如下:

 

 解決方案:

這個問題出現的場景是在node環境下使用express框架的靜態資源訪問,加上下面的代碼即可:

 

 同時要保證這個要訪問的靜態資源在public目錄下即可解決。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



猜您在找 瀏覽器報錯 Refused to apply style from 'http://******' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled. layer報錯Refused to apply style from 'http://192.168.101.12:5502/skin/layer.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled的解決方法 spring security中前端訪問Refused to execute script from 'http://localhost:8080/' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled. Refused to execute script from '....js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.md 對於錯誤“Refused to execute script from '...' because its MIME type ('') is not executable, and strict MIME type checking is enabled.”的處理。 because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checkin HTML5 because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME c because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checkin 關於使用Django項目Google瀏覽器報錯because its MIME type ('text/plain') is not executable, and strict MIME type checking is enabled. [WEB]對於"Refused to execute script from 'http://xx.xx.xx/yy/zz.js' because its MIME type ('') is not executable, and strict MIME type checking is enabled."問題的解決辦法
 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM