A CDN is a content delivery network with a collection of servers that caches and delivers content (such as images, videos and css files) from the closest server, rather than the origin server.
Content Caching
Content caching is a type of performance optimisation.
DNS is the Domain Name System that associates a computer-readable IP address to a human-friendly domain name. For example, the domain name will resolve to the IP address
The header of request and response messages in the Hypertext Transfer Protocol (HTTP) define the operating parameters of an HTTP transaction. For example, the header Cache-Control is used to specify directives that must be obeyed by all caching mechanisms along the request-response chain.
If a requested file is not on the caching server, it is fetched from the origin server, delivered to the user and stored for later use. This scenario is usually slower, since the file must be loaded from the main server, but it only happens when the file is first accessed or if the cache has been reset.