Fetch: About `cache` option

Created on 17 Nov 2016  路  4Comments  路  Source: github/fetch

Seems cache option not work in this polyfill.
It's hard to do polyfill for some cache mode such as force-cache. But we could support behavior similar to no-store by query string at least.
So do you think it is necessary to do this?
I think it will be convenient if this option is available, although I could assemble the URL outside.

Most helpful comment

@mislav this is really an issue on IE11, would you be interested in review-ing a PR for this?

All 4 comments

There are some things we are not able to polyfill due to limitations with XMLHttpRequest. This is one of them. Sure, we could maybe support no-store by appending a cache-busting parameter to the URL, but I'd rather not tamper with URLs. Also, it doesn't make sense to implement just one of the possible cache options while not supporting the others.

OK got it. THX

@mislav this is really an issue on IE11, would you be interested in review-ing a PR for this?

There are some things we are not able to polyfill due to limitations with XMLHttpRequest. This is one of them.

I understand that you may not be able to polyfill all behavior of IE, but I would expect that IE11's caching behavior is the same as that of other browsers when no cache settings are provided.

IMO, default behavior should be the same in polyfilled and non-polyfilled browsers.

Also, it doesn't make sense to implement just one of the possible cache options while not supporting the others.

It makes even less sense to have different default behavior in a polyfilled browser than in the other browsers. This kind of defeats the purpose of using a polyfill.

See https://github.com/github/fetch/issues/629.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

seekcx picture seekcx  路  4Comments

karladler picture karladler  路  4Comments

knowbody picture knowbody  路  5Comments

codeashian picture codeashian  路  3Comments

AllenFang picture AllenFang  路  5Comments