Design comparison
Solution retrospective
For some reason the click event isn't repeatable on Firefox. It will load the initial time but not after... The function is still firing though, as I tested it with console.log("test")
at the last line of the function and it logged it.. just wouldn't update the DOM ? Works fine on Edge and Chrome
Community feedback
- @remyboirePosted over 2 years ago
Hi @AndyAshley, well done for this project ! The data is cached by default, you can try this at line 6 in your JS file :
let response = await fetch("https://api.adviceslip.com/advice", { cache: "no-cache" });
. You can read more on cache control here on mozilla.org.Marked as helpful1@AndyAshleyPosted over 2 years ago@remyboire That did it! Thanks! I was going crazy trying to figure out what was going on lol.
0
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