What is cache = false in ajax?

3

What exactly does Ajax code do when I write:

 cache: false,

in an ajax request?

    
asked by anonymous 09.01.2018 / 13:10

2 answers

2

When we use the request many times, and it has the same return, the browser saves the cache so we can not have an updated response and we ended up seeing the same result, putting cache: false of the browser to save the cache, always keeping it updated, another tip and whenever you are developing you update the page with Ctrl + F5 .

    
09.01.2018 / 13:16
3

The cache:false no jQuery Ajax serves to force the requested pages not to be cached. (It's as if you disabled the cache for that page you submitted the request for.)

You can use both and GET , HEAD / p>     

09.01.2018 / 13:15