Open josezulu opened 4 years ago
By default "Disable Cache" is usually checked within the dev tools network pane. Please verify if that is what is causing this issue. Thanks!
By default "Disable Cache" is usually checked within the dev tools network pane. Please verify if that is what is causing this issue. Thanks!
No, that is not what's causing the issue.
Can anyone else try to reproduce following the steps I mentioned in my original post?
I can't figure out why the browser is not caching the responses from the api.
Reproduce:
1) Open Chrome or Firefox 2) Open the dev tools 3) Go to the Network tab 4) Press Escape key to open the console (or open from somewhere in the menu)
5) Type the following request, make sure you use your api key number:
fetch("https://www.omdbapi.com/?i=tt2861424&apikey=YOUR-KEY-HERE")
6) You should see on the network pane that the request is issued, and in the transfer column it should read
x.xx kB
7) Issue the very same request again from the console (press the up arrow and then enter)
8) You should see on the network pane that the request is issued again, and the transfer column should read again
x.xx kB
. Which means it didn't load the response from the cache, because otherwise it would readcached
.Try the steps above with:
fetch("https://www.test-cors.org/")
Your browser should load the second response from the cache.
The api response headers seem to have the correct
expires
header one hour from modified, so it should load it from the cache. But there are other headers regarding cache control that perhaps are interfering?I'm not sure where is the issue. Anyone?