Mobile app version of vmapp.org
Login or Join
Cooney921

: JQuery not loading from CDN 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

@Cooney921

Posted in: #Assets #Cdn #Htaccess #Jquery #Localhost

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 !^(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 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.

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Cooney921

2 Comments

Sorted by latest first Latest Oldest Best

 

@Karen161

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.

10% popularity Vote Up Vote Down


 

@Rivera981

Remove "http:" from the script src url, like:

<script src="//code.jquery.com/jquery-2.1.4.min.js">


In case the problem insists, check if shows errors through Chrome Dev Console and paste it here.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme