-
Notifications
You must be signed in to change notification settings - Fork 27.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add etag header to optimized image response #18986
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Stats from current PRDefault Server Mode (Increase detected
|
vercel/next.js canary | vercel/next.js 18563-etag | Change | |
---|---|---|---|
buildDuration | 14s | 14.1s | |
nodeModulesSize | 85 MB | 85 MB |
Page Load Tests Overall increase ✓
vercel/next.js canary | vercel/next.js 18563-etag | Change | |
---|---|---|---|
/ failed reqs | 0 | 0 | ✓ |
/ total time (seconds) | 2.668 | 2.652 | -0.02 |
/ avg req/sec | 936.94 | 942.8 | +5.86 |
/error-in-render failed reqs | 0 | 0 | ✓ |
/error-in-render total time (seconds) | 1.648 | 1.637 | -0.01 |
/error-in-render avg req/sec | 1517.06 | 1526.98 | +9.92 |
Client Bundles (main, webpack, commons)
vercel/next.js canary | vercel/next.js 18563-etag | Change | |
---|---|---|---|
677f882d2ed8..7d3b.js gzip | 11.3 kB | 11.3 kB | ✓ |
framework.HASH.js gzip | 39 kB | 39 kB | ✓ |
main-6a509b2..b31a.js gzip | 7.4 kB | 7.4 kB | ✓ |
webpack-e067..f178.js gzip | 751 B | 751 B | ✓ |
Overall change | 58.4 kB | 58.4 kB | ✓ |
Client Bundles (main, webpack, commons) Modern
vercel/next.js canary | vercel/next.js 18563-etag | Change | |
---|---|---|---|
677f882d2ed8..dule.js gzip | 7.04 kB | 7.04 kB | ✓ |
framework.HA..dule.js gzip | 39 kB | 39 kB | ✓ |
main-0547acd..dule.js gzip | 6.39 kB | 6.39 kB | ✓ |
webpack-07c5..dule.js gzip | 751 B | 751 B | ✓ |
Overall change | 53.1 kB | 53.1 kB | ✓ |
Legacy Client Bundles (polyfills)
vercel/next.js canary | vercel/next.js 18563-etag | Change | |
---|---|---|---|
polyfills-4b..e242.js gzip | 31 kB | 31 kB | ✓ |
Overall change | 31 kB | 31 kB | ✓ |
Client Pages
vercel/next.js canary | vercel/next.js 18563-etag | Change | |
---|---|---|---|
_app-7231d4b..5856.js gzip | 1.28 kB | 1.28 kB | ✓ |
_error-fca3d..2eb1.js gzip | 3.44 kB | 3.44 kB | ✓ |
hooks-d4591d..e7c2.js gzip | 887 B | 887 B | ✓ |
index-17468f..5d83.js gzip | 227 B | 227 B | ✓ |
link-8a9d104..0e42.js gzip | 1.55 kB | 1.55 kB | ✓ |
routerDirect..924c.js gzip | 284 B | 284 B | ✓ |
withRouter-7..c13d.js gzip | 284 B | 284 B | ✓ |
Overall change | 7.96 kB | 7.96 kB | ✓ |
Client Pages Modern
vercel/next.js canary | vercel/next.js 18563-etag | Change | |
---|---|---|---|
_app-75d3a82..dule.js gzip | 625 B | 625 B | ✓ |
_error-4469a..dule.js gzip | 2.29 kB | 2.29 kB | ✓ |
hooks-cbf13f..dule.js gzip | 387 B | 387 B | ✓ |
index-b9a643..dule.js gzip | 226 B | 226 B | ✓ |
link-d1cfb87..dule.js gzip | 1.49 kB | 1.49 kB | ✓ |
routerDirect..dule.js gzip | 284 B | 284 B | ✓ |
withRouter-f..dule.js gzip | 282 B | 282 B | ✓ |
Overall change | 5.59 kB | 5.59 kB | ✓ |
Client Build Manifests
vercel/next.js canary | vercel/next.js 18563-etag | Change | |
---|---|---|---|
_buildManifest.js gzip | 322 B | 322 B | ✓ |
_buildManife..dule.js gzip | 330 B | 330 B | ✓ |
Overall change | 652 B | 652 B | ✓ |
Rendered Page Sizes
vercel/next.js canary | vercel/next.js 18563-etag | Change | |
---|---|---|---|
index.html gzip | 1 kB | 1 kB | ✓ |
link.html gzip | 1.01 kB | 1.01 kB | ✓ |
withRouter.html gzip | 996 B | 996 B | ✓ |
Overall change | 3.01 kB | 3.01 kB | ✓ |
Serverless Mode (Increase detected ⚠️ )
General Overall increase ⚠️
vercel/next.js canary | vercel/next.js 18563-etag | Change | |
---|---|---|---|
buildDuration | 16s | 16s | -5ms |
nodeModulesSize | 85 MB | 85 MB |
Client Bundles (main, webpack, commons)
vercel/next.js canary | vercel/next.js 18563-etag | Change | |
---|---|---|---|
677f882d2ed8..7d3b.js gzip | 11.3 kB | 11.3 kB | ✓ |
framework.HASH.js gzip | 39 kB | 39 kB | ✓ |
main-6a509b2..b31a.js gzip | 7.4 kB | 7.4 kB | ✓ |
webpack-e067..f178.js gzip | 751 B | 751 B | ✓ |
Overall change | 58.4 kB | 58.4 kB | ✓ |
Client Bundles (main, webpack, commons) Modern
vercel/next.js canary | vercel/next.js 18563-etag | Change | |
---|---|---|---|
677f882d2ed8..dule.js gzip | 7.04 kB | 7.04 kB | ✓ |
framework.HA..dule.js gzip | 39 kB | 39 kB | ✓ |
main-0547acd..dule.js gzip | 6.39 kB | 6.39 kB | ✓ |
webpack-07c5..dule.js gzip | 751 B | 751 B | ✓ |
Overall change | 53.1 kB | 53.1 kB | ✓ |
Legacy Client Bundles (polyfills)
vercel/next.js canary | vercel/next.js 18563-etag | Change | |
---|---|---|---|
polyfills-4b..e242.js gzip | 31 kB | 31 kB | ✓ |
Overall change | 31 kB | 31 kB | ✓ |
Client Pages
vercel/next.js canary | vercel/next.js 18563-etag | Change | |
---|---|---|---|
_app-7231d4b..5856.js gzip | 1.28 kB | 1.28 kB | ✓ |
_error-fca3d..2eb1.js gzip | 3.44 kB | 3.44 kB | ✓ |
hooks-d4591d..e7c2.js gzip | 887 B | 887 B | ✓ |
index-17468f..5d83.js gzip | 227 B | 227 B | ✓ |
link-8a9d104..0e42.js gzip | 1.55 kB | 1.55 kB | ✓ |
routerDirect..924c.js gzip | 284 B | 284 B | ✓ |
withRouter-7..c13d.js gzip | 284 B | 284 B | ✓ |
Overall change | 7.96 kB | 7.96 kB | ✓ |
Client Pages Modern
vercel/next.js canary | vercel/next.js 18563-etag | Change | |
---|---|---|---|
_app-75d3a82..dule.js gzip | 625 B | 625 B | ✓ |
_error-4469a..dule.js gzip | 2.29 kB | 2.29 kB | ✓ |
hooks-cbf13f..dule.js gzip | 387 B | 387 B | ✓ |
index-b9a643..dule.js gzip | 226 B | 226 B | ✓ |
link-d1cfb87..dule.js gzip | 1.49 kB | 1.49 kB | ✓ |
routerDirect..dule.js gzip | 284 B | 284 B | ✓ |
withRouter-f..dule.js gzip | 282 B | 282 B | ✓ |
Overall change | 5.59 kB | 5.59 kB | ✓ |
Client Build Manifests
vercel/next.js canary | vercel/next.js 18563-etag | Change | |
---|---|---|---|
_buildManifest.js gzip | 322 B | 322 B | ✓ |
_buildManife..dule.js gzip | 330 B | 330 B | ✓ |
Overall change | 652 B | 652 B | ✓ |
Serverless bundles Overall increase ⚠️
vercel/next.js canary | vercel/next.js 18563-etag | Change | |
---|---|---|---|
_error.js | 915 kB | 915 kB | |
404.html | 4.73 kB | 4.73 kB | ✓ |
hooks.html | 3.92 kB | 3.92 kB | ✓ |
index.js | 915 kB | 916 kB | |
link.js | 964 kB | 965 kB | |
routerDirect.js | 957 kB | 958 kB | |
withRouter.js | 957 kB | 958 kB | |
Overall change | 4.72 MB | 4.72 MB |
Stats from current PRDefault Server Mode (Increase detected
|
vercel/next.js canary | vercel/next.js 18563-etag | Change | |
---|---|---|---|
buildDuration | 11.5s | 11.8s | |
nodeModulesSize | 85 MB | 85 MB |
Page Load Tests Overall increase ✓
vercel/next.js canary | vercel/next.js 18563-etag | Change | |
---|---|---|---|
/ failed reqs | 0 | 0 | ✓ |
/ total time (seconds) | 2.169 | 2.203 | |
/ avg req/sec | 1152.69 | 1134.72 | |
/error-in-render failed reqs | 0 | 0 | ✓ |
/error-in-render total time (seconds) | 1.263 | 1.182 | -0.08 |
/error-in-render avg req/sec | 1978.65 | 2115.91 | +137.26 |
Client Bundles (main, webpack, commons)
vercel/next.js canary | vercel/next.js 18563-etag | Change | |
---|---|---|---|
677f882d2ed8..7d3b.js gzip | 11.3 kB | 11.3 kB | ✓ |
framework.HASH.js gzip | 39 kB | 39 kB | ✓ |
main-6a509b2..b31a.js gzip | 7.4 kB | 7.4 kB | ✓ |
webpack-e067..f178.js gzip | 751 B | 751 B | ✓ |
Overall change | 58.4 kB | 58.4 kB | ✓ |
Client Bundles (main, webpack, commons) Modern
vercel/next.js canary | vercel/next.js 18563-etag | Change | |
---|---|---|---|
677f882d2ed8..dule.js gzip | 7.04 kB | 7.04 kB | ✓ |
framework.HA..dule.js gzip | 39 kB | 39 kB | ✓ |
main-0547acd..dule.js gzip | 6.39 kB | 6.39 kB | ✓ |
webpack-07c5..dule.js gzip | 751 B | 751 B | ✓ |
Overall change | 53.1 kB | 53.1 kB | ✓ |
Legacy Client Bundles (polyfills)
vercel/next.js canary | vercel/next.js 18563-etag | Change | |
---|---|---|---|
polyfills-4b..e242.js gzip | 31 kB | 31 kB | ✓ |
Overall change | 31 kB | 31 kB | ✓ |
Client Pages
vercel/next.js canary | vercel/next.js 18563-etag | Change | |
---|---|---|---|
_app-7231d4b..5856.js gzip | 1.28 kB | 1.28 kB | ✓ |
_error-fca3d..2eb1.js gzip | 3.44 kB | 3.44 kB | ✓ |
hooks-d4591d..e7c2.js gzip | 887 B | 887 B | ✓ |
index-17468f..5d83.js gzip | 227 B | 227 B | ✓ |
link-8a9d104..0e42.js gzip | 1.55 kB | 1.55 kB | ✓ |
routerDirect..924c.js gzip | 284 B | 284 B | ✓ |
withRouter-7..c13d.js gzip | 284 B | 284 B | ✓ |
Overall change | 7.96 kB | 7.96 kB | ✓ |
Client Pages Modern
vercel/next.js canary | vercel/next.js 18563-etag | Change | |
---|---|---|---|
_app-75d3a82..dule.js gzip | 625 B | 625 B | ✓ |
_error-4469a..dule.js gzip | 2.29 kB | 2.29 kB | ✓ |
hooks-cbf13f..dule.js gzip | 387 B | 387 B | ✓ |
index-b9a643..dule.js gzip | 226 B | 226 B | ✓ |
link-d1cfb87..dule.js gzip | 1.49 kB | 1.49 kB | ✓ |
routerDirect..dule.js gzip | 284 B | 284 B | ✓ |
withRouter-f..dule.js gzip | 282 B | 282 B | ✓ |
Overall change | 5.59 kB | 5.59 kB | ✓ |
Client Build Manifests
vercel/next.js canary | vercel/next.js 18563-etag | Change | |
---|---|---|---|
_buildManifest.js gzip | 322 B | 322 B | ✓ |
_buildManife..dule.js gzip | 330 B | 330 B | ✓ |
Overall change | 652 B | 652 B | ✓ |
Rendered Page Sizes
vercel/next.js canary | vercel/next.js 18563-etag | Change | |
---|---|---|---|
index.html gzip | 1 kB | 1 kB | ✓ |
link.html gzip | 1.01 kB | 1.01 kB | ✓ |
withRouter.html gzip | 996 B | 996 B | ✓ |
Overall change | 3.01 kB | 3.01 kB | ✓ |
Serverless Mode (Increase detected ⚠️ )
General Overall increase ⚠️
vercel/next.js canary | vercel/next.js 18563-etag | Change | |
---|---|---|---|
buildDuration | 13.1s | 13.3s | |
nodeModulesSize | 85 MB | 85 MB |
Client Bundles (main, webpack, commons)
vercel/next.js canary | vercel/next.js 18563-etag | Change | |
---|---|---|---|
677f882d2ed8..7d3b.js gzip | 11.3 kB | 11.3 kB | ✓ |
framework.HASH.js gzip | 39 kB | 39 kB | ✓ |
main-6a509b2..b31a.js gzip | 7.4 kB | 7.4 kB | ✓ |
webpack-e067..f178.js gzip | 751 B | 751 B | ✓ |
Overall change | 58.4 kB | 58.4 kB | ✓ |
Client Bundles (main, webpack, commons) Modern
vercel/next.js canary | vercel/next.js 18563-etag | Change | |
---|---|---|---|
677f882d2ed8..dule.js gzip | 7.04 kB | 7.04 kB | ✓ |
framework.HA..dule.js gzip | 39 kB | 39 kB | ✓ |
main-0547acd..dule.js gzip | 6.39 kB | 6.39 kB | ✓ |
webpack-07c5..dule.js gzip | 751 B | 751 B | ✓ |
Overall change | 53.1 kB | 53.1 kB | ✓ |
Legacy Client Bundles (polyfills)
vercel/next.js canary | vercel/next.js 18563-etag | Change | |
---|---|---|---|
polyfills-4b..e242.js gzip | 31 kB | 31 kB | ✓ |
Overall change | 31 kB | 31 kB | ✓ |
Client Pages
vercel/next.js canary | vercel/next.js 18563-etag | Change | |
---|---|---|---|
_app-7231d4b..5856.js gzip | 1.28 kB | 1.28 kB | ✓ |
_error-fca3d..2eb1.js gzip | 3.44 kB | 3.44 kB | ✓ |
hooks-d4591d..e7c2.js gzip | 887 B | 887 B | ✓ |
index-17468f..5d83.js gzip | 227 B | 227 B | ✓ |
link-8a9d104..0e42.js gzip | 1.55 kB | 1.55 kB | ✓ |
routerDirect..924c.js gzip | 284 B | 284 B | ✓ |
withRouter-7..c13d.js gzip | 284 B | 284 B | ✓ |
Overall change | 7.96 kB | 7.96 kB | ✓ |
Client Pages Modern
vercel/next.js canary | vercel/next.js 18563-etag | Change | |
---|---|---|---|
_app-75d3a82..dule.js gzip | 625 B | 625 B | ✓ |
_error-4469a..dule.js gzip | 2.29 kB | 2.29 kB | ✓ |
hooks-cbf13f..dule.js gzip | 387 B | 387 B | ✓ |
index-b9a643..dule.js gzip | 226 B | 226 B | ✓ |
link-d1cfb87..dule.js gzip | 1.49 kB | 1.49 kB | ✓ |
routerDirect..dule.js gzip | 284 B | 284 B | ✓ |
withRouter-f..dule.js gzip | 282 B | 282 B | ✓ |
Overall change | 5.59 kB | 5.59 kB | ✓ |
Client Build Manifests
vercel/next.js canary | vercel/next.js 18563-etag | Change | |
---|---|---|---|
_buildManifest.js gzip | 322 B | 322 B | ✓ |
_buildManife..dule.js gzip | 330 B | 330 B | ✓ |
Overall change | 652 B | 652 B | ✓ |
Serverless bundles Overall increase ⚠️
vercel/next.js canary | vercel/next.js 18563-etag | Change | |
---|---|---|---|
_error.js | 915 kB | 915 kB | |
404.html | 4.73 kB | 4.73 kB | ✓ |
hooks.html | 3.92 kB | 3.92 kB | ✓ |
index.js | 915 kB | 916 kB | |
link.js | 964 kB | 965 kB | |
routerDirect.js | 957 kB | 958 kB | |
withRouter.js | 957 kB | 958 kB | |
Overall change | 4.72 MB | 4.72 MB |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Stats from current PRDefault Server Mode (Increase detected
|
vercel/next.js canary | vercel/next.js 18563-etag | Change | |
---|---|---|---|
buildDuration | 13.1s | 12.7s | -371ms |
nodeModulesSize | 85 MB | 85 MB |
Page Load Tests Overall increase ✓
vercel/next.js canary | vercel/next.js 18563-etag | Change | |
---|---|---|---|
/ failed reqs | 0 | 0 | ✓ |
/ total time (seconds) | 2.394 | 2.327 | -0.07 |
/ avg req/sec | 1044.32 | 1074.28 | +29.96 |
/error-in-render failed reqs | 0 | 0 | ✓ |
/error-in-render total time (seconds) | 1.264 | 1.258 | -0.01 |
/error-in-render avg req/sec | 1978.24 | 1987.68 | +9.44 |
Client Bundles (main, webpack, commons)
vercel/next.js canary | vercel/next.js 18563-etag | Change | |
---|---|---|---|
677f882d2ed8..7d3b.js gzip | 11.3 kB | 11.3 kB | ✓ |
framework.HASH.js gzip | 39 kB | 39 kB | ✓ |
main-6a509b2..b31a.js gzip | 7.4 kB | 7.4 kB | ✓ |
webpack-e067..f178.js gzip | 751 B | 751 B | ✓ |
Overall change | 58.4 kB | 58.4 kB | ✓ |
Client Bundles (main, webpack, commons) Modern
vercel/next.js canary | vercel/next.js 18563-etag | Change | |
---|---|---|---|
677f882d2ed8..dule.js gzip | 7.04 kB | 7.04 kB | ✓ |
framework.HA..dule.js gzip | 39 kB | 39 kB | ✓ |
main-0547acd..dule.js gzip | 6.39 kB | 6.39 kB | ✓ |
webpack-07c5..dule.js gzip | 751 B | 751 B | ✓ |
Overall change | 53.1 kB | 53.1 kB | ✓ |
Legacy Client Bundles (polyfills)
vercel/next.js canary | vercel/next.js 18563-etag | Change | |
---|---|---|---|
polyfills-4b..e242.js gzip | 31 kB | 31 kB | ✓ |
Overall change | 31 kB | 31 kB | ✓ |
Client Pages
vercel/next.js canary | vercel/next.js 18563-etag | Change | |
---|---|---|---|
_app-7231d4b..5856.js gzip | 1.28 kB | 1.28 kB | ✓ |
_error-fca3d..2eb1.js gzip | 3.44 kB | 3.44 kB | ✓ |
hooks-d4591d..e7c2.js gzip | 887 B | 887 B | ✓ |
index-17468f..5d83.js gzip | 227 B | 227 B | ✓ |
link-8a9d104..0e42.js gzip | 1.55 kB | 1.55 kB | ✓ |
routerDirect..924c.js gzip | 284 B | 284 B | ✓ |
withRouter-7..c13d.js gzip | 284 B | 284 B | ✓ |
Overall change | 7.96 kB | 7.96 kB | ✓ |
Client Pages Modern
vercel/next.js canary | vercel/next.js 18563-etag | Change | |
---|---|---|---|
_app-75d3a82..dule.js gzip | 625 B | 625 B | ✓ |
_error-4469a..dule.js gzip | 2.29 kB | 2.29 kB | ✓ |
hooks-cbf13f..dule.js gzip | 387 B | 387 B | ✓ |
index-b9a643..dule.js gzip | 226 B | 226 B | ✓ |
link-d1cfb87..dule.js gzip | 1.49 kB | 1.49 kB | ✓ |
routerDirect..dule.js gzip | 284 B | 284 B | ✓ |
withRouter-f..dule.js gzip | 282 B | 282 B | ✓ |
Overall change | 5.59 kB | 5.59 kB | ✓ |
Client Build Manifests
vercel/next.js canary | vercel/next.js 18563-etag | Change | |
---|---|---|---|
_buildManifest.js gzip | 322 B | 322 B | ✓ |
_buildManife..dule.js gzip | 330 B | 330 B | ✓ |
Overall change | 652 B | 652 B | ✓ |
Rendered Page Sizes
vercel/next.js canary | vercel/next.js 18563-etag | Change | |
---|---|---|---|
index.html gzip | 1 kB | 1 kB | ✓ |
link.html gzip | 1.01 kB | 1.01 kB | ✓ |
withRouter.html gzip | 996 B | 996 B | ✓ |
Overall change | 3.01 kB | 3.01 kB | ✓ |
Serverless Mode (Increase detected ⚠️ )
General Overall increase ⚠️
vercel/next.js canary | vercel/next.js 18563-etag | Change | |
---|---|---|---|
buildDuration | 14.4s | 14.5s | |
nodeModulesSize | 85 MB | 85 MB |
Client Bundles (main, webpack, commons)
vercel/next.js canary | vercel/next.js 18563-etag | Change | |
---|---|---|---|
677f882d2ed8..7d3b.js gzip | 11.3 kB | 11.3 kB | ✓ |
framework.HASH.js gzip | 39 kB | 39 kB | ✓ |
main-6a509b2..b31a.js gzip | 7.4 kB | 7.4 kB | ✓ |
webpack-e067..f178.js gzip | 751 B | 751 B | ✓ |
Overall change | 58.4 kB | 58.4 kB | ✓ |
Client Bundles (main, webpack, commons) Modern
vercel/next.js canary | vercel/next.js 18563-etag | Change | |
---|---|---|---|
677f882d2ed8..dule.js gzip | 7.04 kB | 7.04 kB | ✓ |
framework.HA..dule.js gzip | 39 kB | 39 kB | ✓ |
main-0547acd..dule.js gzip | 6.39 kB | 6.39 kB | ✓ |
webpack-07c5..dule.js gzip | 751 B | 751 B | ✓ |
Overall change | 53.1 kB | 53.1 kB | ✓ |
Legacy Client Bundles (polyfills)
vercel/next.js canary | vercel/next.js 18563-etag | Change | |
---|---|---|---|
polyfills-4b..e242.js gzip | 31 kB | 31 kB | ✓ |
Overall change | 31 kB | 31 kB | ✓ |
Client Pages
vercel/next.js canary | vercel/next.js 18563-etag | Change | |
---|---|---|---|
_app-7231d4b..5856.js gzip | 1.28 kB | 1.28 kB | ✓ |
_error-fca3d..2eb1.js gzip | 3.44 kB | 3.44 kB | ✓ |
hooks-d4591d..e7c2.js gzip | 887 B | 887 B | ✓ |
index-17468f..5d83.js gzip | 227 B | 227 B | ✓ |
link-8a9d104..0e42.js gzip | 1.55 kB | 1.55 kB | ✓ |
routerDirect..924c.js gzip | 284 B | 284 B | ✓ |
withRouter-7..c13d.js gzip | 284 B | 284 B | ✓ |
Overall change | 7.96 kB | 7.96 kB | ✓ |
Client Pages Modern
vercel/next.js canary | vercel/next.js 18563-etag | Change | |
---|---|---|---|
_app-75d3a82..dule.js gzip | 625 B | 625 B | ✓ |
_error-4469a..dule.js gzip | 2.29 kB | 2.29 kB | ✓ |
hooks-cbf13f..dule.js gzip | 387 B | 387 B | ✓ |
index-b9a643..dule.js gzip | 226 B | 226 B | ✓ |
link-d1cfb87..dule.js gzip | 1.49 kB | 1.49 kB | ✓ |
routerDirect..dule.js gzip | 284 B | 284 B | ✓ |
withRouter-f..dule.js gzip | 282 B | 282 B | ✓ |
Overall change | 5.59 kB | 5.59 kB | ✓ |
Client Build Manifests
vercel/next.js canary | vercel/next.js 18563-etag | Change | |
---|---|---|---|
_buildManifest.js gzip | 322 B | 322 B | ✓ |
_buildManife..dule.js gzip | 330 B | 330 B | ✓ |
Overall change | 652 B | 652 B | ✓ |
Serverless bundles Overall increase ⚠️
vercel/next.js canary | vercel/next.js 18563-etag | Change | |
---|---|---|---|
_error.js | 915 kB | 915 kB | |
404.html | 4.73 kB | 4.73 kB | ✓ |
hooks.html | 3.92 kB | 3.92 kB | ✓ |
index.js | 915 kB | 916 kB | |
link.js | 964 kB | 965 kB | |
routerDirect.js | 957 kB | 958 kB | |
withRouter.js | 957 kB | 958 kB | |
Overall change | 4.72 MB | 4.72 MB |
buffer: Buffer | ||
) { | ||
const etag = getHash([buffer]) | ||
res.setHeader('Cache-Control', 'public, max-age=0, must-revalidate') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand this line - why is the cache max-age set to 0? Does this affect images?
I thought images would be 60 seconds as per https://nextjs.org/docs/basic-features/image-optimization#caching
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree it's a bit confusing, it caught me off guard as well.
What I get from it is that there are two different forms of caching: on the process hosting NextJS (server) and browser (client) side.
Here, the client side is instructed to always check if there's a newer version of the image available. Which is necessary with the introduction of etags to allow the NextJS process to invalidate images at any time.
On the server side, NextJS has its own cache for the generated images. The cached image will be served according to the max-age
header value when retrieving the image, defaulting to 60 seconds if the header was not supplied.
Fixes #18563 by adding the etag header to the optimized image response.
This does not change the expireAt (TTL) for cached files on the server, which still uses the max-age of the upstream response.
The new file format on disk for cached image files is the following: