@elaineleung
Posted
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 helpful
@ComanderPotato
Posted
@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?
@elaineleung
Posted
@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 helpful