Regarding static file cache

March 6, 2017 764 views
Nginx Caching Server Optimization Ubuntu 16.04

I recently noticed one thing which is not clear to me. After browser cache static files, some files are serving from memory cache and some from disk cache. i want to know, is this controlled by chrome or from the origin server side? is there any way to instruct browser to keep all files in memory when possible from origin server?

please checkout the screenshot and take a look at the red marked files.

1 Answer

That's controlled by the browser. The server can only recommend storing a file in cache, but it's always up to the browser to choose what to do.
If you closed your browser, open it up again, show the developer tool and go to the site, then all files would be loaded from disk, since there's nothing in the memory.

Have another answer? Share your knowledge.