Advice Slip JSON API not working properly?
I'm doing the Frontend Mentor Challenge: Advice Generator which they say uses the API from the title.
It says on their site that a new piece of advice can be fetched every 2 seconds.
But when I click on my button to fetch my new advice it only gives me the same piece of advice for like several minutes and only then changing it up.
I don't have any Network Errors only 200 Status returns after every button click.
I don't think I have done anything wrong but the requested entry point also returns new advice after 2 seconds: https://api.adviceslip.com/advice
3 Replies
Think.about caching
So now thr fetch is using a cache
@roelof I looked around and found this.
It seems to work now I just don't know if it's the correct way to do that. 😄
I used this one fetch("https://api.adviceslip.com/advice", { cache: "no-cache" })
but I think they are both doing the same