GitHub CDN 사용하기

Jmnote (토론 | 기여)님의 2015년 1월 26일 (월) 17:14 판
GitHub CDN 사용하기
Refused to execute script from http://raw.githubusercontent.com

1 문제상황

  • raw.githubusercontent.com 로 접근하면 거부됨
<link rel="stylesheet" href="//raw.githubusercontent.com/xdan/datetimepicker/master/jquery.datetimepicker.css">
<script src="//raw.githubusercontent.com/xdan/datetimepicker/master/jquery.datetimepicker.js"></script>
datetimepicker2.php:1 Refused to execute script from 'http://raw.githubusercontent.com/xdan/datetimepicker/master/jquery.datetimepicker.js' because its MIME type ('text/plain') is not executable, and strict MIME type checking is enabled.

2 해결방법

  • cdn.rawgit.com 로 접근하면 사용 가능
<link rel="stylesheet" href="//cdn.rawgit.com/xdan/datetimepicker/master/jquery.datetimepicker.css">
<script src="//cdn.rawgit.com/xdan/datetimepicker/master/jquery.datetimepicker.js"></script>

3 같이 보기

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}