When you access a Web page, your browser requests the entire page and all of its contents from the Web server where the page resides. Requesting the entire page from the server each time you access the page takes some time, placing demands on both your Internet connection and the server itself. By caching the page, your browser can considerably improve the time it takes for the page to load.
Page and Graphics
When your browser accesses a Web page, it must retrieve a number of elements. The page itself is stored as a computer file, and the entire file must transfer from the server to your computer. In addition, your Web browser retrieves any style sheets associated with the page and any graphics the page may contain. Each of these files must travel over many miles and through numerous computer networks to reach your computer. The first time your browser retrieves these files, it may cache a copy; the next time it accesses the site, it will only retrieve the files that have changed. By reducing the number of files that must travel from the server to your computer, caching the page and associated files reduces the transfer time and improves the speed with which the page loads.
Apps, Videos and Large Images
Some Web designers embed applications, scripts, graphics and other elements into Web pages. Because of their large sizes, sometimes several megabytes, these images can take a long time to transfer and cause the page to load very slowly. Just as your browser can cache pages and associated files, it may also cache videos and apps to reduce transfer time and load them more quickly. For complex applications and large videos, caching allows the browser to load the content right away, instead of waiting for the entire file to transfer each time you use it.
HTTP Requests
When your browser retrieves each individual file associated with a Web page, it does not retrieve all of the files in a single request. Instead, your browser issues a separate hypertext transfer protocol, or HTTP, request for each file and graphic associated with the page. Each of these requests must resolve to the server, and the server handles each request as a separate and independent query. If the page has not changed very much, loading the graphics and information from the local cache also reduces the number of HTTP requests necessary to load the page. These requests reduce demand on the server and allow it to return the necessary information more quickly.
Other Considerations
Sometimes, a Web page’s cache is not stored on your computer but is stored on a server that is physically closer to you than the server where the page resides. By using a content distribution network, Web designers can reduce the number of different servers, or hops, the page must traverse to reach your computer. Some Web designers also use an “Expire” setting; this setting instructs the browser to only request new content after a specified time. As a result, the browser quickly loads the cached copy and only requests the page again when the cache expires.
Page and Graphics
When your browser accesses a Web page, it must retrieve a number of elements. The page itself is stored as a computer file, and the entire file must transfer from the server to your computer. In addition, your Web browser retrieves any style sheets associated with the page and any graphics the page may contain. Each of these files must travel over many miles and through numerous computer networks to reach your computer. The first time your browser retrieves these files, it may cache a copy; the next time it accesses the site, it will only retrieve the files that have changed. By reducing the number of files that must travel from the server to your computer, caching the page and associated files reduces the transfer time and improves the speed with which the page loads.
Apps, Videos and Large Images
Some Web designers embed applications, scripts, graphics and other elements into Web pages. Because of their large sizes, sometimes several megabytes, these images can take a long time to transfer and cause the page to load very slowly. Just as your browser can cache pages and associated files, it may also cache videos and apps to reduce transfer time and load them more quickly. For complex applications and large videos, caching allows the browser to load the content right away, instead of waiting for the entire file to transfer each time you use it.
HTTP Requests
When your browser retrieves each individual file associated with a Web page, it does not retrieve all of the files in a single request. Instead, your browser issues a separate hypertext transfer protocol, or HTTP, request for each file and graphic associated with the page. Each of these requests must resolve to the server, and the server handles each request as a separate and independent query. If the page has not changed very much, loading the graphics and information from the local cache also reduces the number of HTTP requests necessary to load the page. These requests reduce demand on the server and allow it to return the necessary information more quickly.
Other Considerations
Sometimes, a Web page’s cache is not stored on your computer but is stored on a server that is physically closer to you than the server where the page resides. By using a content distribution network, Web designers can reduce the number of different servers, or hops, the page must traverse to reach your computer. Some Web designers also use an “Expire” setting; this setting instructs the browser to only request new content after a specified time. As a result, the browser quickly loads the cached copy and only requests the page again when the cache expires.