Local Weather Project doesn't work on codepen

Local Weather Project doesn't work on codepen
0

#1


Here is the link. For some reasons it doesn’t work on codepen. It works on my computer though. Any ideas?
Console: XMLHttpRequest cannot load … failed to start loading.


#2

Chrome needs HTTPS to use the geolocation API. But openweathermap uses HTTP. You can’t load a HTTP request over HTTPS (Chrome blocks it). You can simply use var url = "https://crossorigin.me/http://api.openweathermap.org/data instead of var url = "http://api.openweathermap.org/data. Crossorigin.me is regularly down though, so you might want to use an API that gets your location based on ip address or use a weather API that allows HTTPS.


#3

works on my end Firefox


#4

thanks guys, this was the only project left before my front end certificate


#5

Awesome, congrats! :ok_hand: