0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

javascriptで外部ファイルを読み込むときは、URLのプロトロコル部分は省略する

Last updated at Posted at 2016-05-11

参考記事:http://dqn.sakusakutto.jp/2013/05/script_src_http.html

外部サイトのJSやCSSなどを読み込むときは
<script src="http://example.com/js/jquery.js"></script>

というように書くのではなく、"http:"の部分は省略して
<script src="//example.com/js/jquery.js"></script>
と書くのが良いらしい。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?