Computerhelp4all logo Articles AboutTopicsQuizzesComputer Questions & AnswersComputer Terms & DefinitionsActivitiesContact

What Is Web Caching?

What Is Web Caching

Date First Published: 25th August 2022

Topic: Web Design & Development

Subtopic: Web Applications

Article Type: Computer Terms & Definitions

Difficulty: Medium

Difficulty Level: 5/10

Learn more about what web caching is in this article.

Web caching is the process of temporarily storing recently requested files, information, and data into a cache or storage location so that they can be accessed faster in the future. Web caching takes place on both the server side and the client side. Whilst browsing the World Wide Web, the caching of pages can result in faster page loading times and fewer delays. Once the cache is cleared, the webpage will send a request to the web server and load as it if was the first time the user has visited the page, which is necessary to see changes to certain types of files, such as CSS files. There are four types of web caching, which include:

Note: Info Icon

Cache is pronounced 'cash', not 'cash-ee', 'catch', or 'carsh'.

Browser Caching

Browser caching takes place in the web browser and the cache is stored on the local computer. Whenever a user visits a webpage in their web browser, their browser may cache the HTML, CSS, JavaScript files, and images for a certain period of time. After caching, the web browser will load the files from the local cache and they will not have to be redownloaded. This shortens the page loading time and reduces the number of requests made to the web server. Web browsers store these files until their time to live (TTL) expires, users clear their cache in their web browser settings, or until the disk space is full.

CDN Caching

A CDN is a group of servers located in different countries that are designed to provide fast delivery of content by caching web content, such as images videos, webpages, CSS, and JavaScript files, and connecting users to a geographically closer data centre rather than wherever the web server of a website is located. CDNs automatically choose the best server for each user, reducing latency, as the servers are closer to the user making the request. The cache is stored on a CDN's cache proxy servers rather than on a local computer. This reduces the load on the origin server and speeds up the delivery of content. CDN caching servers are located in data centres all around the world so that they are as close to end users requesting the content as possible.

CDNs store the cached data until the TTL expires. The TTL specifies the number of seconds, minutes, hours, or days content will be cached and is stored in the HTTP header. Some CDNs may automatically delete files from the cache early if the content is not requested for a while or if the CDN cache is manually cleared. Each time websites respond to a CDN server with the requested content, they also attach the TTL of the content.

Search Engine Caching

Search engines, such as Google and Bing store cached versions of pages that appear on the search engine results page (SERP). When a page is crawled, it collects the contents of the page in order for it to be indexed and can store a copy of that page at the same time. The cached version shows the page as it was when it was indexed by the web crawler, so the content may have changed since then. Users can view cached versions of websites when the website they are trying to visit is down or cannot be reached. Not all websites have search engine cache as the webmaster can choose not to make a cached copy available to search engines by adding the noarchive tag to the head of the HTML document.

DNS Caching

DNS cache temporarily stores previous DNS lookups on a computer in order to retrieve the IP addresses and translate domain names into IP addresses quicker, reduce the number of full DNS lookups that are requested from browsers, and overall speed up the DNS process. For more information on DNS caching, see here.


Feedback

  • Is there anything that you disagree with on this page?
  • Are there any spelling, grammatical, or punctuation errors on this page?
  • Are there any broken links or design errors on this page?

If so, it is important that you tell me as soon as possible on this page.