问题原文
原帖链接 · Richard Testani · CC BY-SA 3.0
I have a custom CMS, and for some reason jQuery will not load from the CDN. After sitting on this for days, I remember I made a change the the .htaccess file but not sure if it's really the cause.
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond $1 !^(index\.php|themes|assets|images|coobie|robots\.txt)
RewriteRule ^ index.php [QSA,L]
Would this prevent:
<script src="http://code.jquery.com/jquery-2.1.4.min.js"></script>
from loading? The site is on my local computer, so it's requested form https://localhost
How I know jQuery is not loading: When I check the dev tools in Safari it's not listed in the scripts that are loaded. Also my scripts that were working, now log '$' is undefined. The link works fine if I head to it, so something is stopping it.
已采纳解答
原帖链接 · Andrew Lott · CC BY-SA 3.0
You're trying to load a HTTP resource on a HTTPS page. Your browser may be blocking this external resource because it's considered insecure on an otherwise "secure" page.
Change src="http://code.jquery.com/jquery-2.1.4.min.js" to src="https://code.jquery.com/jquery-2.1.4.min.js" and see if that helps.
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
