Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

why jquery is blocked in https ? [duplicate]

I got a problem when i go on my website with https. The CDN of jquery is blocked. Here is the message send in console Mixed Content: The page at 'https://eoxys-esport.com/?here=home' was loaded over HTTPS, but requested an insecure script 'http://code.jquery.com/jquery-3.3.1.min.js'. This request has been blocked; the content must be served over HTTPS.

The website works when i am in http.

like image 238
MydroX Avatar asked Apr 24 '26 04:04

MydroX


2 Answers

You need to load the jQuery script from a secured HTTPS protocol. Just use https://code.jquery.com/jquery-3.3.1.min.js and the error should be gone. Cheers.

like image 85
Csaba Avatar answered Apr 26 '26 17:04

Csaba


It's always best to load scripts and/or css from CDN's using <script src="//code.jquery.com/jquery-3.3.1.min.js"></script> without https: or http: as then based on the protocol you are on, the correct CDN protocol will be used. Cause if you hardcode https: you will get the same errors when the page requesting the CDN file is on http:

like image 27
Alvin Bakker Avatar answered Apr 26 '26 19:04

Alvin Bakker



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!