OrderNot attempted
A returning visitor after a deploy
A user who visited last week opens the site again after a deploy. HTML is no-cache; hashed assets are cached for a year. Order what happens.
Drag the rows, or use the arrows, to put them in order from first to last.
- React hydrates with the new code
- Unchanged files are found in the cache under their old names; changed ones are downloaded
- The browser reads the new hashed file names from the HTML
- The ETag no longer matches, so the server responds 200 with the new HTML
- The browser sends a conditional request for the HTML (
If-None-Matchwith its stored ETag)
Show answer & explanation
Correct order:
- The browser sends a conditional request for the HTML (
If-None-Matchwith its stored ETag) - The ETag no longer matches, so the server responds 200 with the new HTML
- The browser reads the new hashed file names from the HTML
- Unchanged files are found in the cache under their old names; changed ones are downloaded
- React hydrates with the new code
The always-revalidated HTML is how a deploy reaches users. Because names come from content, only files whose contents changed have new URLs, so a returning user downloads just the difference.