Frontend System Design Course
Frontend System Design
/
Advanced

ETag & Cache Validation

Definition

An ETag (Entity Tag) is an HTTP header containing a unique hash of a file's contents. When a cached file expires, the browser sends the ETag back to the server (`If-None-Match`). If the file hasn't changed, the server returns a 304 Not Modified, saving massive bandwidth.

Explain Like I'm New

The browser asks: 'Hey, I have a file with the fingerprint 12345. Is it still the newest version?' The server says: 'Yes, don't redownload it.'

Architecture & Flow

Interview Questions

basic

  • How does ETag fundamentally work?

intermediate

  • What are the performance implications of ETag?

advanced

  • How does ETag scale in an enterprise architecture?

trick

  • Are there scenarios where ETag is an anti-pattern?

Flash Cards

Question

Define ETag.

Click to reveal answer
Answer

ETag is essential for complex frontend applications.