Http Caching
HTTP protocol supports local caching of static resources by the browser. Most web pages include resources that change infrequently, such as CSS files, image files, JavaScript files, and so on. These resources take time to download over the network, which increases the time it takes to load a web page. HTTP caching allows these resources to be saved, or cached, by a browser. Once a resource is cached, a browser can refer to the locally cached copy instead of having to download it again on subsequent visits to the web page.
The advantage of caching is obvious:
- the page load time for subsequent user visits is reduced, eliminating numerous HTTP requests for the required resources
- the total payload size of the responses is reduced.