【发布时间】:2017-12-29 05:52:15
【问题描述】:
我一直在为 freecodecamp 做random quote machine 项目,但我似乎无法停止缓存 api 的响应。
我尝试了各种答案:
- fetch(), how do you make a non-cached request?
- https://forum.freecodecamp.org/t/apis-and-the-random-quote-machine-not-even-sure-what-to-ask/65982/13
我以为我曾经有过它:
fetch(this.url, {cache: 'no-cache'})
.then(res => res.json())
...但我只是在开发者工具中禁用了缓存。
请帮忙。 :-D。
这是我一直试图让它发挥作用的地方: https://codepen.io/JonathanDWood/pen/gRNNKx
【问题讨论】:
标签: javascript ajax vue.js cache-control fetch-api