Skip to content
  • Unlock Pro
  • Log in with GitHub
Profile
OverviewSolutions
2
Comments
7

Emanuele Gurini

@emanueleguriniItaly140 points

George Hotz's groupie.

Latest solutions

  • Vanilla JS - advicegenerator

    #fetch

    Emanuele Gurini•140
    Submitted almost 3 years ago

    0 comments
  • Github Search using React and TypeScript

    #fetch#react#typescript

    Emanuele Gurini•140
    Submitted almost 3 years ago

    1 comment

Latest comments

  • Elena Annibali•120
    @ElenaAnnibali
    Submitted over 2 years ago

    React Advice Generator

    2
    Emanuele Gurini•140
    @emanuelegurini
    Posted over 2 years ago

    Elena, pay attection on Firefox because some browsers caching the data from a specific server, and in this case Firefox detects that you are sending the request to same end-point, and he try to give you back the data in a faster way sending back the data that your already got before.

    As you know, when you work with HTTP methods you can set many info inside your request (https://developer.mozilla.org/en-US/docs/Web/API/Request/cache), so in that case you need to tell to your browser that you don't want to cache the data: fetch(url, { cache: "reload" })

  • Lidia Krajewska•390
    @lidiakrajewska
    Submitted over 2 years ago

    Vanilla JS + SASS

    #sass/scss
    1
    Emanuele Gurini•140
    @emanuelegurini
    Posted over 2 years ago

    Some browsers caching the data from a specific server, and in this case Firefox detects that you are sending the request to same end-point, and he try to give you back the data in a faster way sending back the data that your already got before.

    As you know, when you work with HTTP methods you can set many info inside your request (https://developer.mozilla.org/en-US/docs/Web/API/Request/cache), so in that case you need to tell to your browser that you don't want to cache the data: fetch(url, { cache: "reload" })

    Marked as helpful
  • mattyoung7•200
    @mattyoung7
    Submitted almost 3 years ago

    Advice Generator App

    1
    Emanuele Gurini•140
    @emanuelegurini
    Posted almost 3 years ago

    Hi @mattyoung7, well done, but reload doesn't works on FireFox: seem that FF caching the fetch result.

    I found this solution on StackOverflow (https://stackoverflow.com/questions/72567690/ui-is-not-updating-on-click-event-that-triggers-a-fetch-on-firefox-developer) but the problem is that property called count is always incremented by one, and, if you start a new session, advice is always the same in a row.

    To avoid the same advice in a row, as you can see from my solution, I create a new Random number, and I use it only if my script detects firefox browser.

    My solution: https://github.com/EmanueleGurini/js-advicegenerator/blob/master/js/main.js

    ps. why am I using 224 as max number? Advices are 224.

  • Mirai•240
    @eyedent1ty
    Submitted almost 3 years ago

    Advice generator app

    1
    Emanuele Gurini•140
    @emanuelegurini
    Posted almost 3 years ago

    Hi Mirai, well done, but reload doesn't works on FireFox: seem that FF caching the fetch result.

    I found this solution on StackOverflow (https://stackoverflow.com/questions/72567690/ui-is-not-updating-on-click-event-that-triggers-a-fetch-on-firefox-developer) but the problem is that property called count is always incremented by one, and, if you start a new session, advice is always the same in a row.

    To avoid the same advice in a row, as you can see from my solution, I create a new Random number, and I use it only if my script detects firefox browser.

    My solution: https://github.com/EmanueleGurini/js-advicegenerator/blob/master/js/main.js

    ps. why am I using 224 as max number? Advices are 224. Ema

    Marked as helpful
  • Gareth•410
    @Gareth-Moore
    Submitted almost 3 years ago

    A little bit of CSS magic, a pinch of JS and dash of API.

    2
    Emanuele Gurini•140
    @emanuelegurini
    Posted almost 3 years ago

    Hi Gareth, seems that Firefox is caching the fetch result. I found this solution on StackOverflow (https://stackoverflow.com/questions/72567690/ui-is-not-updating-on-click-event-that-triggers-a-fetch-on-firefox-developer) but the problem is that property called count is always incremented by one, and, if you start a new session, advice is always the same in a row.

    To avoid the same advice in a row, as you can see from my solution, I create a new Random number, and I use it only if my script detects firefox browser.

    My solution: https://github.com/EmanueleGurini/js-advicegenerator/blob/master/js/main.js

    ps. why am I using 224 as max number? Advices are 224.

    Marked as helpful
  • Ihor Cherniavskyi•90
    @f3an
    Submitted almost 3 years ago

    react

    #react
    1
    Emanuele Gurini•140
    @emanuelegurini
    Posted almost 3 years ago

    Hi Ihor, I was checking your solution and I think that is well done. Btw, when you search a user that does not exist and try to change color theme, there are some problem with the middle box: does not update color.

    Emanuele

    Marked as helpful
View more comments
Frontend Mentor logo

Stay up to datewith new challenges, featured solutions, selected articles, and our latest news

Frontend Mentor

  • Unlock Pro
  • Contact us
  • FAQs
  • Become a partner

Explore

  • Learning paths
  • Challenges
  • Solutions
  • Articles

Community

  • Discord
  • Guidelines

For companies

  • Hire developers
  • Train developers
© Frontend Mentor 2019 - 2025
  • Terms
  • Cookie Policy
  • Privacy Policy
  • License

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub