Fetch caching response - no-cache headers not working as expected

Viewed 2822

I've been doing the random quote machine project for freecodecamp and I can't seem to stop the response from the api being cached.

I've tried various answers:

I thought I had it at one point:

fetch(this.url, {cache: 'no-cache'})
    .then(res => res.json())

... but I was just disabling the cache in developer tools.

Please help. :-D.

Here is where i've been trying to make it work: https://codepen.io/JonathanDWood/pen/gRNNKx

1 Answers
Related