Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

Advice Generator

@Tariqul-huda

Desktop design screenshot for the Advice generator app coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
  • API
2junior
View challenge

Design comparison


SolutionDesign

Solution retrospective


After pressing the button second time, it does not show any new advice. But If I press the button a little bit later, it shows new advice.

What should I do to make it instantaneous?

Community feedback

@dillon-porter

Posted

Hi Tariqul,

To help with your code to show an advice quote instantaneous try adding:

{cache: "no-cache"} at the end of your fetch API call.

For example,

fetch('https://api.adviceslip.com/advice', {cache: "no-cache"})

Hope this helps!

Marked as helpful

1

@Tariqul-huda

Posted

@dillon-porter Thank you so much for the feedback! Now, It works the way I want.

0

@dillon-porter

Posted

@Tariqul-huda No problem!

0

Please log in to post a comment

Log in with GitHub
Discord logo

Join 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