Why my Quote Machine doesn't work in github pages?

I would like to hear from you guys How do you like my project?

But I dont’t understand why doesn’t work in github pages,


If someone knows why this project doesn’t work in github pages please let me know. :blush:


I tried this https://codepen.io/melissa160/full/woeePB/ and it stopped working, so it’s probably because of https. Read your API documentation, they maybe mention that.

Thanks, It’s strange, sometimes works other times no. The API documentation doesn’t mention about https:
Do you recommend me change the API?

Thanks a lot!

As @svmi3195 noted it’s because of https.

GitHub Pages are served via HTTPS, but your code is making request via HTTP and due to security reasons such requests are blocked by browser. You can open browser console (Ctrl + Shift + J) and see the message yourself.

There is a workaround - you can add https://crossorigin.me/ in front of your API call url, like this:


but lately the crossorigin.me server is very often down, so I wouldn’t count on it.

Btw, here is link to your API endpoint with https: https://quotes.stormconsultancy.co.uk/quotes.json, click it and check how it works via https (spoiler: it doesn’t)