@zougari47
Posted
Try this
fetch('https://api.adviceslip.com/advice', {
cache: 'no-cache'
})
Marked as helpful
I accept any kind of feedback!
EDIT: Ignore the paragraph below, people already helped me fix my problem with Firefox!
Also I would like to know why my page ins't working correctly on Firefox. The page shows me an advice, but does not let me get another one.
@zougari47
Posted
Try this
fetch('https://api.adviceslip.com/advice', {
cache: 'no-cache'
})
Marked as helpful
@HectorMartinDama
Posted
Hello @alexgabriel8, in your request to the api use this:
fetch('https://api.adviceslip.com/advice/' + Math.floor(Math.random() * 200))
The random number is because if you do not indicate a specific advice, it does not work correctly, in your project change the advice when you click in the button five times
Marked as helpful
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