Design comparison
SolutionDesign
Community feedback
- @seapaganPosted over 2 years ago
Looks great, well done :)
One thing to look out for is that you would not see new advice in Firefox, and the button seems to do nothing because Firefox caches the response. To fix this, add
{cache: 'no-store'}
to your fetch command like so :fetch("https://api.adviceslip.com/advice",{cache: 'no-store'})
Also, perhaps remove the original placeholder text from your HTML in the 'advice'
h2
?- On the first load, you sometimes see a flash of the placeholder before the API returns the new Advice fragment. You can't leave H2 empty, though, as it may be tagged in the report; maybe put a space or a period?Marked as helpful0
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