Frontend School
DashboardProblemsLearnPracticeMock InterviewReportsStatsBuy Credits
DashboardProblemsLearnPracticeMock Interview
Frontend System Design Roadmap
  1. 1.HTTP/1.1 vs HTTP/2 vs HTTP/3 (QUIC)
  2. 2.TCP and TLS Handshakes: Connection Setup Costs
  3. 3.Browser Network Stack and Connection Pooling
  4. 4.GET vs POST and Idempotency in HTTP
  5. 5.The Critical Rendering Path (CRP)
  6. 6.DOM, CSSOM and the Render Tree
  7. 7.Layout, Paint and Compositing
  8. 8.Reflows and Repaints Explained
  9. 9.Event Loop: Call Stack, Task and Microtask Queues
  10. 10.Async JavaScript: Promises and async/await
  11. 11.Web Workers: Multi-threading in the Browser
  12. 12.Browser Storage: Cookies, Web Storage, IndexedDB
  13. 13.Client-Side Storage: Limits and Security Risks
  14. 14.Choosing the Right Client-Side Storage
  15. 15.HTTP Caching: Cache-Control, ETag, Last-Modified
  16. 16.Browser-Level Caching Mechanisms
  17. 17.Cache Invalidation for Frontend Apps
  18. 18.Structuring a Large Single-Page App
  19. 19.Component-Based Architecture Principles
  20. 20.Props, State and Component Lifecycle
  21. 21.Module Bundling Basics
  22. 22.Core Web Vitals: LCP, INP and CLS
  23. 23.FCP and Time to Interactive (TTI) Explained
  24. 24.Measuring Performance: Lighthouse and WebPageTest
  25. 25.Asset Compression and Minification Basics
  26. 26.What Is a CDN and How Does It Work?
  27. 27.CDN Benefits: Latency, Availability, Offload
  28. 28.CDN Cache Behavior and Invalidation
  29. 29.Global State vs Local Component State
  30. 30.State Patterns: Redux, Zustand and Context
  31. 31.Data Fetching: React Query and SWR
  32. 32.Immutable Data in Frontend State
  33. 33.SSR vs CSR: Rendering Trade-offs
  34. 34.Hydration and Time to First Byte (TTFB)
  35. 35.Static Site Generation (SSG) for Speed and SEO
  36. 36.Incremental Static Regeneration (ISR)
  37. 37.Micro-Frontends: Core Principles
  38. 38.Micro-Frontend Integration Strategies
  39. 39.Communication Between Micro-Frontends
  40. 40.Micro-Frontends: Pros and Cons for Large Teams
  41. 41.Real-Time: Polling, SSE and WebSockets
  42. 42.Real-Time Use Cases: Chat, Alerts, Live Data
  43. 43.Designing a Real-Time Data Flow
  44. 44.Scaling WebSocket Connections
  45. 45.Responsive Images: srcset, sizes and picture
  46. 46.Modern Image Formats: WebP, AVIF, JPEG XL
  47. 47.Lazy Loading Images and Videos
  48. 48.Video Streaming: HLS, DASH, Adaptive Bitrate
  49. 49.REST and GraphQL for Frontend Engineers
  50. 50.Batching, Throttling and Debouncing API Calls
  51. 51.Handling API Errors in the Frontend
  52. 52.Authentication Flows: OAuth and JWT
  53. 53.Global Error Boundaries in React
  54. 54.Error Reporting: Sentry and LogRocket
  55. 55.Graceful Degradation and Fallback UIs
  56. 56.Real User Monitoring (RUM)
  57. 57.CORS: Cross-Origin Resource Sharing
  58. 58.Preventing XSS (Cross-Site Scripting)
  59. 59.CSRF Protection for Frontend Apps
  60. 60.Content Security Policy (CSP)
  61. 61.Storing Auth Tokens: Cookies vs localStorage
  62. 62.PWA Manifest and Installability
  63. 63.Service Workers: Lifecycle and Caching Strategies
  64. 64.Offline Support and Background Sync
  65. 65.Push Notifications for Web Apps
  66. 66.Webpack vs Vite vs Parcel
  67. 67.Code Splitting, Tree Shaking, Asset Optimization
  68. 68.Module Resolution and Hot Module Replacement
  69. 69.Monorepo Tooling: Nx and Lerna
  70. 70.Atomic Design for Component Libraries
  71. 71.Theming and Customization in Design Systems
  72. 72.Accessibility in Component Libraries
  73. 73.Component Library Docs, Testing and Versioning
  74. 74.Publishing and Consuming a Component Library
  75. 75.Full-Text Search: Levenshtein and Fuzzy Matching
  76. 76.Indexing Large Datasets in the Browser
  77. 77.Search Performance: Debouncing and Web Workers
  78. 78.Integrating Backend Search Services
  79. 79.Choosing a Chart Library: D3, Chart.js, Recharts
  80. 80.Rendering Large Datasets: Canvas vs SVG
  81. 81.Interactive, Responsive Data Visualizations
  82. 82.Data Fetching and Aggregation for Dashboards
  83. 83.A/B Test Design and Rollout Strategies
  84. 84.Client-Side vs Server-Side A/B Testing
  85. 85.Feature Flags and Remote Configuration
  86. 86.Experiment Data Collection and Analytics
Frontend System Design Roadmap
23

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.

Try a free mock interviewPractice system design problems
Previous

Core Web Vitals: LCP, INP and CLS

Next

Measuring Performance: Lighthouse and WebPageTest