C4f1151075b447779af31e99d6cf70e2c6eb47ac
By:
newbie

Regarding static file cache

March 6, 2017 758 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.
http://imgur.com/a/9FRQL

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.