javascript - Fetch API Cache Mode -


according spec, there various cache modes fetch api. ("default", "no-store", "reload", "no-cache", "force-cache", , "only-if-cached") however, isn't clear each mode for, or state of browser support.

you can see documentation of polyfill here: https://fetch.spec.whatwg.org/

it explain each value means

"default" fetch inspect http cache on way network. if there fresh response used. if there stale response conditional request created, , normal request otherwise. updates http cache response. [http]

"no-store" fetch behaves if there no http cache @ all.

"reload" fetch behaves if there no http cache on way network. ergo, creates normal request , updates http cache response.

"no-cache" fetch creates conditional request if there response in http cache , normal request otherwise. updates http cache response.

"force-cache" fetch uses response in http cache matching request, not paying attention staleness. if there no response, creates normal request updates http cache response.


Comments

Popular posts from this blog

Process 'command 'F:\android-sdk\build-tools\21.1.2\aapt.exe'' finished with non-zero exit value 1 -

apache - setting document root in antoher partition on ubuntu -

java - Updating to mongo 3.0 -