Frontend System Design · Lesson 23 of 86 · 4 min
FCP and Time to Interactive (TTI) Explained
This is where you show you understand the difference between a page that looks fast and a page that is fast.
After the last lesson on Core Web Vitals, you might wonder why we’re talking about other metrics. First Contentful Paint (FCP) and Time to Interactive (TTI) are important because they describe the critical gap between when a user sees something and when they can do something. Nailing this distinction in an interview demonstrates a mature understanding of user-perceived performance.
FCP is the "Is this thing on?" moment
First Contentful Paint marks the first pixel of anything from the DOM being rendered. This could be text, an image, or an SVG. It's the moment the user gets confirmation that the page is actually loading and the server has responded.
A fast FCP is about reassuring the user. The main culprits for a slow FCP are network latency and render-blocking resources. If your <head> is full of synchronous CSS and JS files, the browser has to download and parse them all before it can paint anything.
FCP is not a Core Web Vital. It's a diagnostic metric that helps you understand the very beginning of the loading experience.
TTI is when the page actually works
Time to Interactive measures how long it takes for a page to become reliably responsive to user input. The formal definition is specific: TTI is marked when the page has displayed useful content (after FCP), event handlers are registered for most visible page elements, and the page responds to user interactions within 50 milliseconds.
This means the main thread isn't clogged. The browser considers the page interactive only after a 5-second window of "network and main thread quietness." If a long task runs, the clock resets.
The trap: A candidate explains TTI as "when the page is loaded." That's too vague. You need to mention the main thread being free from long tasks and the page being consistently responsive.
The FCP-TTI Gap: The Uncanny Valley of Performance
The most important concept to connect these two metrics is the gap between them. A page can have a great FCP (under 1 second) but a terrible TTI (over 10 seconds). This creates a frustrating experience where the page looks ready, but clicks and scrolls do nothing.
This gap is almost always caused by JavaScript. The browser has painted the initial HTML/CSS, but now it's busy executing large JS bundles—hydrating a framework, initializing third-party scripts, or running heavy analytics. The user is staring at a UI that's frozen.
In an interview, describe this as the "rage click" scenario. The user sees a button, clicks it, and nothing happens, so they click it again and again. This demonstrates you're thinking about the user's emotional response to performance, not just the numbers.
The diagram below shows the main thread being blocked by long tasks, preventing the page from becoming interactive even after content has been painted.
How to find what's delaying interactivity
TTI is delayed by "long tasks"—any piece of code that monopolizes the main thread for more than 50 milliseconds. You can find these programmatically using a PerformanceObserver. This is a powerful tool for debugging real-world performance issues, and mentioning it shows you know your browser APIs.
This code snippet sets up an observer that listens for and logs any long tasks, giving you a direct signal of what's blocking interactivity.
function observeLongTasks() {
if (!('PerformanceObserver' in window)) {
console.log('PerformanceObserver not supported.');
return;
}
const observer = new PerformanceObserver((list) => {
for (const entry of list.getEntries()) {
// Log the details of the long task.
// In a real app, you'd send this to your analytics service.
console.warn('Long Task Detected:', {
duration: `${entry.duration.toFixed(2)}ms`,
startTime: entry.startTime.toFixed(2),
name: entry.name,
// attribution helps identify the script responsible
attribution: entry.attribution,
});
}
});
observer.observe({ type: 'longtask', buffered: true });
console.log('Observing long tasks...');
}
observeLongTasks();
Run this in the console of a complex web app (like a news site or a heavy dashboard) during load. You'll likely see several long tasks fire, each one contributing to a delayed TTI.
Why TTI is deprecated (and why you still need to know it)
Here's a key detail that will set you apart. As of Lighthouse v10 (2023), TTI is no longer a reported metric and was removed from the scoring. It was replaced by a focus on Total Blocking Time (TBT) and Interaction to Next Paint (INP), which you learned about in the previous lesson.
So why did we just spend a lesson on it?
TTI was deprecated because it could be flaky and hard to measure consistently. But the concept it represents—the period of main thread contention after initial paint—is more important than ever. The problems that cause a poor TTI are the exact same problems that cause a high TBT and a poor INP.
Knowing the history and the "why" behind the change is a sign of a senior developer. You can say: "While TTI itself is deprecated in Lighthouse, the principle of minimizing the time between first paint and reliable interactivity is still a core performance goal. We now measure the impact of that with TBT and INP."
Try it
Open DevTools on a JavaScript-heavy site (e.g., Reddit, a complex SaaS dashboard). Go to the Performance tab, and record a page load. Find the FCP timing in the "Timings" lane. Now, look at the "Main" thread track for long tasks—the grey blocks with a small red corner. The cluster of those tasks after FCP is your FCP-TTI gap in action.
Next: We'll look at the practical tools you'll use to find and fix these issues in "Measuring Performance: Lighthouse and WebPageTest".
Lock it in — apply this lesson under interview conditions.