The Internet and the World Wide Web: Question 10
Syllabus 5.1
A student opens the website "HistoryHub" on a laptop for the first time, and the page's images take a few seconds to appear. Later that same day, they visit the exact same page again: this time, the same images appear almost instantly, even though the student has not saved any bookmarks and is not logged in to any account on the site.
(a) Name the web browser feature responsible for the images loading almost instantly on the second visit. [1]
(b) Explain how this feature is able to make the images load faster on the second visit. [2]
(c) Explain one way in which this feature is different from a cookie, even though both involve storing something on the student's own device. [2]
(d) State one circumstance under which this feature would no longer speed up loading the images on a later visit to HistoryHub. [1]
Show worked solution Hide worked solution
Worked solution
Part (a): Identifying the feature
Storing copies of a page’s files so that a later visit loads faster is the role of the browser’s cache.
Part (b): How the cache speeds up the second visit
The first time HistoryHub is visited, the browser’s cache saves local copies of files needed to build the page, including its images, directly on the student’s device. When the page is visited again later that day, the browser checks its cache first: rather than requesting the same images from HistoryHub’s web server all over again, it loads the copies already stored locally, which is much faster than downloading them again over the internet.
Part (c): How the cache differs from a cookie
Although both a cache and a cookie involve storing something on the student’s own device, they store different things for different reasons:
- The cache stores copies of the page’s own files, such as images, style sheets or scripts, purely so they do not need to be downloaded again, making the page load faster.
- A cookie stores a small piece of information about the user or their visit, for example a login status or the contents of a shopping basket, so that the website can remember or personalise something for that user.
Since the student in this scenario is not logged in and has no basket or bookmarks saved, no cookie is needed to explain the faster loading; the cache alone accounts for it.
Part (d): When the cache would stop helping
The cache would no longer speed up loading the images if the student cleared their browser’s cache, if the previously stored files had expired and been removed, or if HistoryHub updated its images, so the versions stored locally no longer matched and had to be downloaded again.
Final answers
- (a) Cache.
- (b) The cache stores local copies of the page’s files on the first visit, so they can be loaded from the device rather than downloaded again on a later visit.
- (c) The cache stores copies of page files to speed up loading; a cookie stores information about the user/visit itself, used to remember or personalise something.
- (d) Any one of: the cache is cleared, the cached files expire, or the website’s images are updated.