The /api/contents route (and some other /api routes) do not include a Cache-control header in their response.
They do include a Last-Modified header.
The combination of these two things triggers most browsers to cache the result for a while, requiring consumers of these endpoints to use "cache-busting" techniques like adding timestamps to the query string.
The heuristic used by most browsers to determine how long to cache a result w/ these headers is (Now - Last-Modified) / 10. So if I pull /api/contents for something that hasn't changed in ten hours, the browser will cache that result for one hour.
/api/contents
route (and some other/api
routes) do not include a Cache-control header in their response.The combination of these two things triggers most browsers to cache the result for a while, requiring consumers of these endpoints to use "cache-busting" techniques like adding timestamps to the query string.
The heuristic used by most browsers to determine how long to cache a result w/ these headers is
(Now - Last-Modified) / 10
. So if I pull/api/contents
for something that hasn't changed in ten hours, the browser will cache that result for one hour.More details in https://github.com/nteract/nteract/issues/3850