Caching & Performance MCQs

16 MCQs  — Multiple Browsers MCQs  (Page 2 of 2)

What does a browser send to revalidate a cached resource that has an ETag?
A full new GET with no headers
If-Match with the file size
A HEAD request only
If-None-Match with the ETag value; the server replies 304 Not Modified if the resource is unchanged
What is the difference between <link rel="preload"> and <link rel="prefetch">?
They are identical
preload fetches a high-priority resource needed by the current page; prefetch fetches a low-priority resource likely to be needed for a future navigation
preload works only for images
prefetch is for the current page; preload is for future pages
What is the difference between the HTTP cache and the Cache Storage API?
The HTTP cache is managed automatically by the browser from headers; Cache Storage is controlled by code, typically in a service worker
Cache Storage is managed only by the server
The HTTP cache is controlled by JavaScript
They are the same thing
Which DevTools feature simulates a slow 3G connection to test page performance?
The Lighthouse score
Network throttling
Device mode only
The Elements panel