Design comparison
Solution retrospective
First time using an API on my own, not really sure what all of it means but I kind of understand it.
Community feedback
- @elaineleungPosted about 2 years ago
Hi Tom, well done on this challenge, everything looks good 🙂
Just wanted to let you know, I use Firefox and I'm not able to view past the second loaded advice because of an issue that's commonly seen on Firefox, which is that the next advice doesn't load due to caching. All you just need to add a header object in the fetch method:
fetch("https://api.adviceslip.com/advice", { cache: 'no-cache' })
You can test it out and see as well!
Marked as helpful0@ComanderPotatoPosted about 2 years ago@elaineleung Oh okay thanks, and those are the options for the function yes? Do you have any links to resources regarding them? Or would looking up fetch() on w3schools/mdn be the best bet?
0@elaineleungPosted about 2 years ago@ComanderPotato Hi Tom, here are some resources:
This one's on the fetch API: https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch. What might be of interest to you there is the section on supplying request options.
This one's on the options for cache when making a server request: https://developer.mozilla.org/en-US/docs/Web/API/Request/cache
Marked as helpful0
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord