Summary
FID measures delay from first user input to event handler start — main thread busy (long tasks) inflates it. Legacy metric — replaced by INP but still in field data historically. Reduce JS at load, break up long tasks, defer third parties. Target context in performance checklist.
Code example
new PerformanceObserver((list) => {
for (const entry of list.getEntries()) {
console.log('FID ms:', entry.processingStart - entry.startTime);
}
}).observe({ type: 'first-input', buffered: true });
Key points
- FID measures delay from first user input to event handler start — main thread busy (long tasks) inflates it.
- Legacy metric — replaced by INP but still in field data historically.
- Reduce JS at load, break up long tasks, defer third parties.
- Target context in performance checklist.