0
0
Node.jsframework~5 mins

HTTP caching headers in Node.js - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is the purpose of HTTP caching headers?
HTTP caching headers tell browsers and servers how to store and reuse web resources to make loading faster and reduce network traffic.
Click to reveal answer
intermediate
Explain the difference between Cache-Control: no-cache and Cache-Control: no-store.
no-cache means the browser must check with the server before using cached data. no-store means the browser should never save the response at all.
Click to reveal answer
intermediate
What does the ETag header do in HTTP caching?
The ETag is a unique identifier for a resource version. Browsers send it back to the server to check if the resource changed, so they can avoid downloading it again if unchanged.
Click to reveal answer
beginner
How does the Expires header work?
The Expires header tells the browser a specific date and time after which the cached resource is considered stale and must be fetched again.
Click to reveal answer
intermediate
What is the role of Last-Modified header in caching?
The Last-Modified header shows when the resource was last changed. Browsers use it to ask the server if the resource has changed since that date to decide if they need to download it again.
Click to reveal answer
Which HTTP header tells the browser to always check with the server before using cached content?
AETag
BCache-Control: no-cache
CExpires
DCache-Control: no-store
What does the ETag header help with?
AIdentifying resource versions for validation
BSetting cache expiration date
CPreventing caching entirely
DSpecifying content type
If you want to prevent any caching of a response, which header should you use?
AExpires: 0
BCache-Control: no-cache
CCache-Control: no-store
DLast-Modified
Which header specifies a date/time after which cached content is stale?
ALast-Modified
BCache-Control
CETag
DExpires
How does the Last-Modified header help caching?
AIt tells the browser when the resource was last changed
BIt disables caching
CIt sets the cache duration
DIt identifies the resource version
Describe how HTTP caching headers improve website performance and reduce server load.
Think about how your browser can save time by not downloading the same files again.
You got /4 concepts.
    Explain the difference between Cache-Control: no-cache and Cache-Control: no-store headers.
    One lets you keep data but checks before use; the other never saves it.
    You got /3 concepts.