Performance: HTTP caching headers (ETag, Cache-Control)
HIGH IMPACT
This affects how fast the browser can load resources by reusing cached files instead of downloading them again.
app.use(express.static('public', { maxAge: '1d', etag: true }))
app.use(express.static('public')) // no cache headers set
| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| No caching headers | N/A | N/A | High due to delayed resource loading | [X] Bad |
| Cache-Control with max-age and ETag | N/A | N/A | Low due to cached resources | [OK] Good |