Search code examples
google-chromehttpbrowser-cachecache-control

where is the storage location of the browser's HTTP cache? disk or memory


where is the storage location of the browser's HTTP cache? disk or memory

I just want to know why some files come from disk cache and others from the memory cache, what's the mechanism behind of the HTTP cache? which cache has a higher priority?

It seems that scripts and stylesheets are stored in the disk, while images and fonts are stored in the memory.


Solution

  • maybe solution

    1. memory cache store images and fonts etc, little files
    2. disk cache store js and css etc, big file

    cache control for disk cache

    https://developer.mozilla.org/en-US/docs/Web/HTTP/Caching

    https://web.dev/http-cache/

    https://developers.google.com/web/fundamentals/performance/get-started/httpcaching-6

    https://developers.google.com/web/fundamentals/performance/optimizing-content-efficiency/http-caching