What is the difference between browser cache and server cache?
Both caches speed up delivery, but they act at different points. The browser cache stores resources like images, CSS and JavaScript locally on the visitor's device. When the same user opens another page, the browser loads these files straight from local storage without contacting the server at all. This is controlled via HTTP headers such as Cache-Control.
The server cache, by contrast, keeps pre-rendered HTML pages or the results of expensive database queries on the server, so they can be served instantly even to new visitors. The two layers complement each other: the server cache accelerates the first load, the browser cache every subsequent load from the same visitor. As part of server optimization, we tune both so that content stays fast and yet up to date.