Random Quote Generator not working on Surge, really frustrating!

Random Quote Generator not working on Surge, really frustrating!
0

#1

So I took a break from the voting app to try and deploy the front end projects to surge, the first of them being the random quote generator. It deployed without errors, but now when I try to fetch a quote the console reads: XMLHttpRequest cannot load https://quotesondesign.com/wp-json/posts?filter[orderby]=rand&filter[posts_per_page]=40. The ‘Access-Control-Allow-Origin’ header has a value ‘http://s.codepen.io’ that is not equal to the supplied origin. Origin ‘http://quotes-random.surge.sh’ is therefore not allowed access.

So my question is why is the header showing a value of the codepen address even though it’s completely independent of it now? Or is it not?


#2

Ok this is really weird. I just decided to try it on my mobile device and it’s working. There has to be some reason why it’s only giving this error on my computer.


#3

Surge link??
Maybe it’s a browser issue. Can’t say for sure unless I see it.


#4

Response from quotestondesign.com is cached by the browser.
Clear browser cache.


#5

Worked like a charm, thanks!!