Only works in chrome how to fix this for firefox?
Design comparison
Solution retrospective
I'm not sure why, but when I click the button, the random quote generation feature only seems to work in Chrome and not in Firefox. It seems like there might be an issue with the API when using Firefox.
However, this setback has actually presented a valuable learning opportunity for me. I've been able to delve deeper into understanding APIs and their functionality. As a result, my next goal is to focus on studying form validation and creating a project that revolves around it. I'm also excited because I'm getting closer to starting my journey into studying React.js.
Community feedback
- @Shyann-GPosted over 1 year ago
I'm so glad you posted this as I am doing the same project in Firefox. I didn't have the this issue while using developer mode, but did once I ran everything normally. I started doing a little digging and learned Firefox caches natively caches response from APIs. Since the fetch request is always going to be the same URL, Firefox is just uses the response already in the cache. You'll need to add the no-cache option to the fetch request to prevent Firefox for caching the response.
Marked as helpful1
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