Calcul 100% dans le Navigateur • Zéro Journal Serveur • Exécution Instantanée
Curious TechieBoîte à Outils
HTTP & Web ArchitectureRFC 9110 §8.8.3Verified Terminology

Étiquette d’Entité (ETag)

Réponse Directe

En-tête de réponse HTTP fournissant un identifiant de validation de cache pour déterminer si une ressource a été modifiée sur le serveur.

Entity Relationships (GEO Conceptual Hierarchy)

Taxonomy Model
Relational Knowledge Graph Sequence
ETag→
Cache HTTP→
If-None-Match→
304 Not Modified→
RFC 9110
ETag
•>Cache HTTP
•>If-None-Match
•>304 Not Modified
•>RFC 9110

Technical Explanation & Operational Mechanics

L’ETag permet au navigateur d’envoyer des requêtes conditionnelles via If-None-Match. Si la ressource est inchangée, le serveur renvoie un code 304 Not Modified sans réémettre le corps de la réponse.

Technical Example & Practical Implementation

Mise en Cache Conditionnelle avec ETag

Requête If-None-Match validant l’intégrité du cache distant.

// Initial Request & Server Response:
GET /assets/bundle.js HTTP/1.1
Host: example.com

HTTP/1.1 200 OK
Content-Length: 450123
ETag: "686897696a7c-87b"
Cache-Control: public, no-cache

// Subsequent Visit (Conditional Request):
GET /assets/bundle.js HTTP/1.1
Host: example.com
If-None-Match: "686897696a7c-87b"

// Server response if unchanged (0 body bytes transmitted):
HTTP/1.1 304 Not Modified
ETag: "686897696a7c-87b"