hyperobject / crossorigin.me

A CORS proxy for everyone.
http://crossorigin.me
MIT License
679 stars 132 forks source link

Doesn't change the result of API #50

Closed dalenguyen closed 8 years ago

dalenguyen commented 8 years ago

When I use the link http://api.forismatic.com/api/1.0/?lang=en&method=getQuote&format=json, it change the content every time the page is refreshed.

With the link https://crossorigin.me/http://api.forismatic.com/api/1.0/?lang=en&method=getQuote&format=json, it doesn't change at all. The content is the same every time the page is reloaded.

Example: http://codepen.io/techcater/full/qNbOWy/

Please take a look at this one.

Thanks,

hyperobject commented 8 years ago

@dalenguyen Hi! crossorigin.me uses caching to lessen the load on the backend servers, so querying the exact same URL often just returns the cached response. You can get around this by appending a nonce at the end of the URL (such as a timestamp). I've modified your pen to show one possible implementation of this: http://codepen.io/anon/pen/JKKaZV

Thanks for using the service!

dalenguyen commented 8 years ago

Thanks for the quick fix. It's amazing!