# Web cache

> Mediated Wiki article. Canonical URL: https://mediated.wiki/source/Web_cache
> Markdown URL: https://mediated.wiki/source/Web_cache.md
> Source: https://en.wikipedia.org/wiki/Web_cache
> Source revision: 1355200155
> License: Creative Commons Attribution-ShareAlike 4.0 International (https://creativecommons.org/licenses/by-sa/4.0/)

System for optimizing the Web

A **web cache** (or **HTTP cache**) is a system for optimizing the World Wide Web. It is implemented both client-side and server-side. The caching of multimedia and other files can result in less overall delay when [browsing](/source/Web_browser) the Web.[1][2]

## Parts of the system

### Forward and reverse

A forward cache is a cache outside the [web server](/source/Web_server)'s network, e.g. in the client's [web browser](/source/Web_browser), in an [Internet service provider](/source/Internet_service_provider), or within a corporate network. A network-aware forward cache only caches heavily accessed items. A proxy server sitting between the client and web server can evaluate HTTP headers and choose whether to store web content.

A reverse cache sits in front of one or more web servers, accelerating requests from the Internet and reducing peak server load. This is usually a [content delivery network](/source/Content_delivery_network) (CDN) that retains copies of web content at various points throughout a network.

### HTTP options

The Hypertext Transfer Protocol (HTTP) defines three basic mechanisms for controlling caches: freshness, validation, and invalidation. This is specified in the header of HTTP response messages from the server.

Freshness allows a response to be used without re-checking it on the origin server, and can be controlled by both the server and the client. For example, the Expires response header gives a date when the document becomes stale, and the Cache-Control: max-age directive tells the cache how many seconds the response is fresh for.

Validation can be used to check whether a cached response is still good after it becomes stale. For example, if the response has a Last-Modified header, a cache can make a *conditional request* using the If-Modified-Since header to see if it has changed. The ETag (entity tag) mechanism also allows for both strong and weak validation.

Invalidation is usually a side effect of another request that passes through the cache. For example, if a URL associated with a cached response subsequently gets a POST, PUT or DELETE request, the cached response will be invalidated. Many CDNs and manufacturers of network equipment have replaced this standard HTTP cache control with dynamic caching.

## Legality

In 1998, the [Digital Millennium Copyright Act](/source/Digital_Millennium_Copyright_Act) added rules to the United States Code (17 U.S.C. §: 512) that exempts system operators from copyright liability for the purposes of caching.

## Server-side software

This is a list of server-side web caching software.

Name Operating system Forward mode Reverse mode License Windows Unix-like Other Apache HTTP Server Yes OS X, Linux, Unix, FreeBSD, Solaris, Novell NetWare OS/2, TPF, OpenVMS, eComStation Yes Apache 2.0 aiScaler Dynamic Cache Control No Linux No Proprietary ApplianSys CACHEbox No Linux No Proprietary Blue Coat ProxySG No No SGOS Yes Yes Proprietary Nginx Yes Linux, BSD, OS X, Solaris, AIX, HP-UX Yes Yes Yes 2-clause BSD-like Microsoft Forefront Threat Management Gateway Yes No No Yes Yes Proprietary Polipo Yes OS X, Linux, OpenWrt, FreeBSD ? Yes Yes MIT License Squid Yes Linux ? Yes Yes GPL Apache Traffic Server ? Linux ? Yes Yes Apache 2.0 Untangle No Linux No Yes Yes Proprietary Varnish No Linux No Needs a VMOD Yes BSD WinGate Yes No No Yes Yes Proprietary (Free for 8 users) Nuster No Linux No Yes Yes GPL McAfee Web Gateway No McAfee Linux Operating System No Yes Yes Proprietary

## See also

- [InterPlanetary File System](/source/InterPlanetary_File_System) - makes web caches redundant

- [Cache Discovery Protocol](/source/Cache_Discovery_Protocol)

- [Cache manifest in HTML5](/source/Cache_manifest_in_HTML5)

- [Content delivery network](/source/Content_delivery_network)

- [Harvest project](/source/Harvest_project)

- [Proxy server](/source/Proxy_server)

- [Web accelerator](/source/Web_accelerator)

- [Search engine cache](/source/Search_engine_cache)

- [Temporary Internet Files](/source/Temporary_Internet_Files)

## References

1. **[^](#cite_ref-1)** Fountis, Yorgos (4 May 2017). ["How does the browser cache work?"](https://pressidium.com/blog/2017/browser-cache-work/).

1. **[^](#cite_ref-2)** Messaoud, S.; Youssef, H. (2009). ["An analytical model for the performance evaluation of stack-based web cache replacement algorithms"](https://onlinelibrary.wiley.com/doi/10.1002/dac.1036). *International Journal of Communication Systems*. **23**: 1–22. [doi](/source/Doi_(identifier)):[10.1002/dac.1036](https://doi.org/10.1002%2Fdac.1036). [S2CID](/source/S2CID_(identifier)) [46507769](https://api.semanticscholar.org/CorpusID:46507769).

## Further reading

- Ari Luotonen, *Web Proxy Servers* (Prentice Hall, 1997) [ISBN](/source/ISBN_(identifier)) [0-13-680612-0](https://en.wikipedia.org/wiki/Special:BookSources/0-13-680612-0)

- Duane Wessels, *Web Caching* (O'Reilly and Associates, 2001). [ISBN](/source/ISBN_(identifier)) [1-56592-536-X](https://en.wikipedia.org/wiki/Special:BookSources/1-56592-536-X)

- Michael Rabinovich and Oliver Spatschak, *Web Caching and Replication* (Addison Wesley, 2001). [ISBN](/source/ISBN_(identifier)) [0-201-61570-3](https://en.wikipedia.org/wiki/Special:BookSources/0-201-61570-3)

v t e Website management Concepts Hosting Clustered Peer-to-peer Self-hosting Virtual Analytics Click analytics Mobile web analytics Web tracking Click tracking Overselling Web document Web content Web content lifecycle Web server Web cache Webmaster Website governance Hosting control panels (comparison) AlternC cPanel DirectAdmin Domain Technologie Control Froxlor i-MSCP ISPConfig Kloxo Plesk Usermin Webmin Top-level domain registries AFNIC auDA DNS Belgium CentralNic CIRA CNNIC CZ.NIC DENIC EURid Freenom GoDaddy Google Domains Identity Digital IPM JPRS KISA NIC México Nominet PIR Tucows Verisign Domain name managers, registrars Bluehost Domainz DreamHost Dynadot Enom Epik Gandi GlowHost GMO Internet GoDaddy Google Domains Hover Infomaniak Jimdo Name.com Namecheap Hostinger NameSilo NearlyFreeSpeech Network Solutions OVH Register.com Squarespace Porkbun Tucows UK2 Webcentral Web.com Wix.com Content management system Document management system Wiki software Blog software

---
Adapted from the Wikipedia article [Web cache](https://en.wikipedia.org/wiki/Web_cache) by Wikipedia contributors ([contributor history](https://en.wikipedia.org/wiki/Web_cache?action=history)). Available under [Creative Commons Attribution-ShareAlike 4.0 International](https://creativecommons.org/licenses/by-sa/4.0/). Changes may have been made.
