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 app with vanilla stuff

P
Fluffy Kas 7,735

@FluffyKas

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


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

@GrzywN

Posted

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 example

fetch("some.json", {cache: "no-cache"})
    .then(function(response) { /* consume the response */ });

Hope this helps! Happy coding!

Marked as helpful

8

P
Fluffy Kas 7,735

@FluffyKas

Posted

@GrzywN Ooh, this worked like charm! Thanks Karol ^_^

1

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