Advice generator app with vanilla stuff
Design comparison
Solution retrospective
Hey guys,
This was a small speedrun challenge. Nothing too complicated, but as I've been working with React only in the past few weeks, months it was kinda refreshing to do a tiny bit of vanilla javascript (even though this was really just a tiny bit).
One thing I noticed though, while the API calls work as intended in Chrome and I manage to generate new advice, it doesn't work very well in Firefox.. It just returns the same piece of advice every time, unless I wait a fair few minutes and close+reopen the project. Not sure what might be causing this, so if anyone can point me in the right direction, I'd be grateful.
Any other feedback is greatly appreciated, as usual!
Have a lovely evening! ^_^
Community feedback
- @GrzywNPosted over 2 years ago
Great job @FluffyKas!
I had the same problem while doing this challenge and I couldn't get any idea why it wasn't working properly, but somehow I figured it out.
To fix this Firefox issue, you have to add
{cache: no-cache}
object to fetch method. For examplefetch("some.json", {cache: "no-cache"}) .then(function(response) { /* consume the response */ });
Hope this helps! Happy coding!
Marked as helpful8@FluffyKasPosted over 2 years ago@GrzywN Ooh, this worked like charm! Thanks Karol ^_^
1
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