-2

I have a application, which takes user inputs in a array, and for every element in the array I am calling my server using fetch, but result is displayed so quickly, it shows cached output, can you please suggest how I can bypass this http cache, while using fetch() method.

Sunag RD
  • 1
  • 4
  • 1
    Please read [How do I ask a good question?](https://stackoverflow.com/help/how-to-ask) and [How to create a Minimal, Reproducible Example](https://stackoverflow.com/help/minimal-reproducible-example) – Rojo Mar 30 '21 at 12:27
  • Look through the [`fetch` documentation.](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) You can find it yourself there – Rojo Mar 30 '21 at 12:29
  • Duplicate of https://stackoverflow.com/questions/29246444/fetch-how-do-you-make-a-non-cached-request – esqew Mar 30 '21 at 12:29
  • Does this answer your question? [fetch(), how do you make a non-cached request?](https://stackoverflow.com/questions/29246444/fetch-how-do-you-make-a-non-cached-request) – Rojo Mar 30 '21 at 12:30

1 Answers1

-1

Use this header => Cache-Control: no-cache


More information

FreePhoenix888
  • 4,510
  • 3
  • 13
  • 22
  • 1
    Or the English version here: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control – Magmatic May 14 '21 at 13:35