Weather reports problem with chrome on Mix content with insecure XMLHttpRequest endpoint

I got erros on Mix content: The page at ‘https://codepen.io/lindawu6/pen/OXLaEo?editors=1111’ was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint ‘http://api.openweathermap.org/data/2.5/weather?lat=37.3951402&lon=-122.03692189999998&appid=9ec5436330d12c1fb5c0ab8a8e2ff7ff’. This request has been blocked; the content must be served over HTTPS.send @ jquery-2.2.4.min.js:4
j

with chrome browser? Any suggestion on how to fix this one will be greatly appreciated.

It’s giving you this error because you’re loading insecure content to a user (you) who has a secure connection to CodePen. It seems like you may have already fixed this by making the AJAX call use HTTPS, but you could also omit the protocol entirely and let the browser use whichever it can at the time:

//api.openweathermap.org/data/…”

No, this bug is not fixed. The weather information is not loaded in Chrome.

I keep forgetting that OpenWeather doesn’t allow SSL connections to their API for free accounts. It will never work. You can either put a note on your website telling people to connect over HTTP (not a grand idea), or use something like Forecast.io.

Got it. Thanks for your reply!