css 파일을 불러오지 못할때

bbbooo·2023년 8월 7일

Refused to apply style from '{경로/header.css}' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.

뷰를 출력할때 css와 js를 분리하였는데 종종 이런 에러가 떴다.

결론은 css 파일을 찾지 못한다는 것이고 경로가 잘못되어 있었다.

오류 코드

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

오류 코드

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

href 경로에 /를 빼고 입력하니 나타난 에러였다.

1개의 댓글

comment-user-thumbnail
2023년 8월 7일

유익한 자료 감사합니다.

답글 달기