Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

option to disable cache #97

Open
jimmywarting opened this issue Oct 14, 2018 · 0 comments
Open

option to disable cache #97

jimmywarting opened this issue Oct 14, 2018 · 0 comments

Comments

@jimmywarting
Copy link

Cache is useful, but i don't wish for it to be set in stone if it should be enabled or disabled

Full context here: https://stackoverflow.com/questions/52349984/chrome-cors-requests-are-faster-when-cache-is-disabled

Another explanation of the problem here: https://stackoverflow.com/questions/27513994/chrome-stalls-when-making-multiple-requests-to-same-resource

with fetch you can set the cache option like so:

fetch(url, { cache: default || reload || no-cache }

when falling back to XMLHttpRequest you would have to add the header

'cache-control': 'no-cache, no-store'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant