Regarding static file cache

Posted March 6, 2017 3.1k views
NginxServer OptimizationCachingUbuntu 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.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
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.