Ctrl + K
Performance17 min read

First Contentful Paint (FCP) Explained

Understand First Contentful Paint, its relationship with page loading, common causes of slow FCP and practical ways to improve rendering performance.

Published: 2026-09-02

First Contentful Paint (FCP) is a web performance metric that measures how long it takes for the browser to render the first piece of DOM content after navigation begins. This first content can be text, an image, an SVG, or other non-white content rendered by the page. FCP helps developers understand how quickly users begin to see meaningful visual output.

A page can technically finish loading many resources later, but users form an impression much earlier. If the browser displays nothing for several seconds, the website can feel slow even when the final page eventually becomes fully interactive. FCP therefore provides an important view of the early loading experience.

What Is First Contentful Paint?

First Contentful Paint represents the point in the page load when the browser first renders content from the DOM. It is different from the moment the browser receives the first byte of the response and different from the moment the entire page finishes loading.

For example, a browser may request an HTML document, receive the response, parse the HTML and then discover CSS and JavaScript resources. Until enough of the rendering pipeline is ready, the user may see a blank screen. FCP occurs when the browser finally paints the first qualifying piece of content.

MetricWhat It Measures
TTFBHow quickly the browser receives the first byte of the response
FCPWhen the first content is painted
LCPWhen the largest relevant content element is painted
INPHow responsive the page is to interactions
CLSHow stable the visual layout remains

Why FCP Matters

FCP is important because it represents the beginning of visible page rendering. A fast FCP usually means that the browser can start displaying something useful quickly, while a slow FCP often indicates that critical resources or server responses are delaying rendering.

  • Provides an early indication of perceived loading speed.
  • Shows when users first see page content.
  • Helps identify rendering delays.
  • Can reveal problems with server response time.
  • Highlights the impact of render-blocking resources.
  • Provides an important diagnostic signal for frontend performance.

FCP should not be treated as the only performance metric. A page can have a good FCP and still have a poor LCP, INP or CLS score. FCP is most useful when analyzed together with the rest of the loading and user experience metrics.

FCP Score Ranges

FCPRating
0 to 1.8 secondsGood
Above 1.8 to 3 secondsNeeds improvement
Above 3 secondsPoor

A good FCP is generally 1.8 seconds or less. Values above 1.8 seconds indicate that the page should be investigated, while values above 3 seconds represent a slow initial rendering experience.

💡 Do not optimize FCP by simply trying to paint an arbitrary element as early as possible. The goal is to make useful page content available quickly while keeping the overall rendering process efficient.

How FCP Happens

Before the browser can paint page content, it must perform several operations. It receives the HTML response, parses the document, discovers resources, processes CSS and builds the structures required for rendering. The exact sequence depends on the page and browser, but delays anywhere in this process can affect FCP.

Navigation
    ↓
Server response
    ↓
HTML parsing
    ↓
Resource discovery
    ↓
CSS processing
    ↓
Render tree construction
    ↓
First Contentful Paint

The browser does not necessarily wait for every resource before displaying content. It can often paint portions of a page while other resources continue loading. However, stylesheets, scripts and other dependencies can prevent or delay rendering when they are required before the browser can safely display the content.

FCP and the Critical Rendering Path

FCP is closely connected to the critical rendering path. The critical rendering path describes the sequence of operations the browser performs to convert HTML, CSS and other resources into pixels on the screen.

HTML provides the document structure, CSS determines presentation and the browser combines the available information to create the structures required for rendering. If a critical resource takes too long to arrive or process, the first paint can be delayed.

Server Response Time and FCP

A slow server response can delay every subsequent step of page rendering. If the browser cannot receive the initial HTML quickly, it cannot begin parsing the document and discovering the resources needed to render the page.

Improving server response time can therefore improve FCP, especially when the page is generated dynamically. Efficient backend code, caching, content delivery networks and appropriate server infrastructure can all reduce the time before the browser receives useful HTML.

FCP and TTFB

Time to First Byte (TTFB) and FCP are related but measure different events. TTFB measures how long it takes to receive the first byte of the response, while FCP measures when the first content is actually painted.

SituationPossible Result
Slow TTFBHTML arrives late and FCP is often delayed
Fast TTFB, slow CSSHTML arrives quickly but rendering may still be delayed
Fast TTFB and optimized critical resourcesFCP can occur much earlier

A good TTFB does not guarantee a good FCP. Once the response arrives, the browser still needs to parse and process the document and its dependencies before it can paint qualifying content.

Render-Blocking CSS

CSS is one of the most important factors affecting early rendering. Stylesheets can block rendering because the browser needs to know how content should be presented before displaying it. Large or numerous CSS files can therefore increase the time before the first content appears.

Reducing unnecessary CSS, removing unused rules, minifying stylesheets and delivering critical styles efficiently can help reduce rendering delays.

<link
  rel="stylesheet"
  href="/styles.css"
/>

Optimizing CSS for FCP

  • Remove unused CSS.
  • Minify production stylesheets.
  • Avoid unnecessarily large CSS frameworks.
  • Reduce the number of blocking stylesheets.
  • Prioritize styles required for the initial viewport.
  • Keep critical CSS small.

JavaScript and FCP

JavaScript can affect FCP when scripts block HTML parsing or consume CPU resources during the initial page load. Large JavaScript bundles can delay other browser tasks and prevent the page from reaching a useful painted state quickly.

Scripts that are not required for the initial rendering should generally be deferred or loaded in a way that does not unnecessarily interfere with the critical rendering path.

<script
  src="/app.js"
  defer
></script>

The defer attribute allows a script to be downloaded without blocking HTML parsing and executes it after the document has been parsed. The correct loading strategy depends on the script's role, but avoiding unnecessary parser-blocking JavaScript is a common performance improvement.

JavaScript Bundle Size

Large bundles require more network transfer, parsing and execution. Even when the network is fast, JavaScript can consume significant main-thread time and compete with rendering work.

  • Remove unused dependencies.
  • Use code splitting where appropriate.
  • Load non-critical features later.
  • Minify production JavaScript.
  • Avoid shipping large libraries for simple tasks.
  • Analyze bundle contents regularly.

HTML Size and FCP

The HTML document is the starting point for the browser's rendering process. Extremely large HTML responses require more data to transfer and more work to parse. Keeping the initial document focused on the content needed for the first view can reduce unnecessary processing.

Server-rendered pages should avoid sending excessive markup that is not required for the initial experience. Repeated data, unnecessary wrappers and large embedded payloads can increase document size without improving what the user sees immediately.

HTML Minification

HTML minification removes unnecessary whitespace, comments and other characters that do not affect the final document structure. The savings vary by page, but large HTML documents can benefit from reducing unnecessary bytes.

<!-- Development -->
<div class="card">
  <h1>Hello</h1>
</div>

<!-- Minified -->
<div class="card"><h1>Hello</h1></div>

Minification is not usually enough to transform a poor FCP into a good one by itself. It is most effective when combined with efficient server responses, optimized CSS, reasonable JavaScript and fast resource delivery.

Fonts and FCP

Web fonts can affect the visual loading experience because font files may need to be downloaded before text is displayed using the desired typeface. Font loading behavior should therefore be considered when optimizing early rendering.

Using fewer font variants, serving appropriately sized font files and choosing a suitable font-display strategy can reduce unnecessary delays. Preloading a truly critical font can also help in situations where that font is essential to the initial visible content.

⚠️ Do not preload every font on a website. Preloading too many resources competes for network bandwidth and can make the overall loading process worse.

Images and FCP

Images can contribute to FCP when the first painted content is an image. Large images can delay visual output if they are required for the initial viewport and are delivered inefficiently.

Images should be appropriately sized for the device, compressed and delivered in modern formats when suitable. The browser should not be forced to download a huge source image when a much smaller resource is sufficient for the displayed dimensions.

Above-the-Fold Content

Above-the-fold content is the portion of the page visible without scrolling. Prioritizing the resources required for this area can improve the perceived loading experience and often helps FCP because the browser can paint useful content sooner.

  • Keep critical markup readily available.
  • Prioritize required CSS.
  • Avoid unnecessary scripts during initial rendering.
  • Optimize visible images.
  • Avoid loading large resources that are only needed below the fold.

Lazy Loading and FCP

Lazy loading is useful for resources that are not immediately needed, particularly content below the initial viewport. However, the main content required for the first visible screen should not be unnecessarily lazy-loaded.

If the first visible image or important content is delayed by an inappropriate lazy-loading strategy, FCP or other loading metrics can suffer. The loading priority should reflect the actual role of each resource on the page.

Caching and FCP

Caching allows browsers and intermediate infrastructure to reuse previously downloaded resources. When static assets are cached effectively, repeat visits can avoid downloading the same CSS, JavaScript, images and fonts again.

Browser caching does not automatically make the first visit fast, but it can significantly improve subsequent navigations and repeat sessions. Proper cache headers and versioned static assets help make caching more effective.

CDNs and FCP

A Content Delivery Network can serve static resources from infrastructure closer to the user. Reducing network distance and improving asset delivery can help resources arrive sooner, which can contribute to faster rendering.

A CDN is particularly useful for websites serving users across different geographic regions. However, moving assets to a CDN does not solve problems caused by excessive JavaScript, render-blocking CSS or slow server-generated HTML.

Preload, Preconnect and Resource Priorities

Resource hints can help the browser establish connections or prioritize important resources. Preconnect can reduce connection setup time for important third-party origins, while preload can request a specific resource earlier than normal discovery might allow.

These mechanisms should be used selectively. Incorrectly preloading resources can compete with more important downloads and increase network contention rather than improving performance.

<link
  rel="preconnect"
  href="https://cdn.example.com"
/>

<link
  rel="preload"
  href="/fonts/main.woff2"
  as="font"
  type="font/woff2"
  crossorigin
/>

Third-Party Scripts

Analytics, advertising, chat widgets, social integrations and other third-party scripts can increase network and main-thread activity during the initial load. Some services may also create additional dependencies that compete with your own resources.

Review third-party resources regularly and load non-essential services after the critical content has become visible whenever possible. Removing unnecessary third-party scripts can improve both network efficiency and browser processing time.

How to Measure FCP

FCP can be measured using browser performance tools, laboratory audits and real-user data. Each method provides different information, so using more than one source is useful when diagnosing performance problems.

MethodBest Use
Browser DevToolsInvestigating loading and rendering behavior
LighthouseControlled performance audits
PageSpeed InsightsLab and available field performance data
Real User MonitoringUnderstanding actual user experiences
Performance APICollecting metrics programmatically

Lab Data vs Field Data

Laboratory performance tests run under controlled conditions. They are useful for reproducing problems and evaluating changes because the environment can be kept relatively consistent. Field data comes from real users and can reveal differences caused by devices, networks, locations and browsing conditions.

A page may have an excellent FCP in a desktop laboratory test but a significantly slower FCP for users on mobile devices or slower networks. For this reason, performance optimization should not rely exclusively on a single synthetic test.

FCP in Single Page Applications

Single Page Applications can have different FCP characteristics depending on how the initial document is delivered. A client-heavy application may initially send a minimal HTML shell and rely on JavaScript to construct the visible interface. This can delay the first meaningful content if the JavaScript bundle is large or slow to execute.

Server-side rendering and static generation can provide more useful HTML in the initial response. However, these approaches do not automatically guarantee a fast FCP. CSS, fonts, images, JavaScript and server response time still influence the final rendering process.

FCP and Server-Side Rendering

Server-side rendering can improve early content availability because the server can generate HTML containing the page content before the browser executes the application's client-side JavaScript. Static generation can provide similar benefits when content can be generated ahead of time.

The important factor is not the framework or rendering strategy by itself. The browser ultimately needs to receive and process the resources required to paint content. A server-rendered page with a huge CSS file and multiple blocking scripts can still have a poor FCP.

Common FCP Mistakes

Slow FCP is often the result of several small performance problems rather than a single broken resource. Developers should examine the entire critical path instead of optimizing one metric in isolation.

  • Using a slow server or inefficient backend rendering.
  • Shipping excessive CSS.
  • Loading large JavaScript bundles before the page can render.
  • Blocking HTML parsing with unnecessary scripts.
  • Downloading oversized images.
  • Preloading too many resources.
  • Loading unnecessary third-party scripts early.
  • Serving large web fonts without an appropriate strategy.
  • Sending excessive HTML.
  • Ignoring caching and CDN opportunities.

Best Practices for Improving FCP

  • Improve server response time.
  • Keep the initial HTML reasonably small.
  • Remove unused CSS.
  • Minify HTML and CSS.
  • Reduce JavaScript bundle size.
  • Defer non-critical scripts.
  • Optimize above-the-fold images.
  • Use appropriate font loading strategies.
  • Cache static assets effectively.
  • Use a CDN for globally distributed static resources.
  • Limit third-party resources during initial loading.
  • Prioritize resources required for the first visible content.
💡 When improving FCP, start with the largest delays in the critical path. Removing one blocking resource or reducing a large server delay can have a much greater effect than making many tiny optimizations.

FCP Optimization Checklist

CheckGoal
Server responseDeliver initial HTML quickly
HTMLKeep the initial document efficient
CSSMinimize render-blocking work
JavaScriptReduce blocking and execution cost
ImagesOptimize visible media
FontsAvoid unnecessary font delays
Third-party scriptsReduce initial loading overhead
CachingReuse previously downloaded assets
CDNImprove geographic resource delivery
Resource priorityLoad critical content first

Frequently Asked Questions

What does First Contentful Paint measure?

FCP measures the time from the beginning of navigation until the browser first renders qualifying DOM content such as text, an image or an SVG.

What is a good FCP score?

An FCP of 1.8 seconds or less is considered good. Values above 1.8 seconds need improvement, while values above 3 seconds are considered poor.

What is the difference between FCP and LCP?

FCP measures when the first qualifying content is painted, while LCP measures when the largest relevant content element becomes visible. FCP focuses on the beginning of visual output, whereas LCP focuses on a later and often more meaningful loading milestone.

Can JavaScript affect FCP?

Yes. Large or parser-blocking JavaScript can delay HTML processing, consume main-thread resources and compete with rendering work, which can result in a slower FCP.

Does CSS affect FCP?

Yes. CSS can affect FCP because stylesheets can block rendering. Large or inefficient stylesheets may delay the browser's ability to display content.

Does TTFB affect FCP?

Yes. A slow TTFB delays delivery of the HTML document, which can delay every subsequent step required to produce the first rendered content. However, a fast TTFB does not guarantee a fast FCP.

Can caching improve FCP?

Caching can improve FCP for repeat visits by allowing the browser to reuse previously downloaded resources. It does not necessarily improve the first visit because the required resources still need to be downloaded initially.

Should all resources be preloaded to improve FCP?

No. Preloading too many resources can create network contention and delay more important resources. Preload should be reserved for resources that are genuinely critical and would otherwise be discovered too late.

Helpful Performance Tools

An HTML Minifier reduces unnecessary characters in HTML, a CSS Minifier compresses stylesheets, a JS Minifier reduces JavaScript file size, an SVG Optimizer removes unnecessary SVG data and a Cache-Control Generator helps create caching directives for HTTP responses. Together, these tools can support several practical aspects of frontend performance optimization.

Conclusion

First Contentful Paint is an important indicator of how quickly a webpage begins displaying content. It measures the transition from an initially blank rendering state to the first visible piece of page content, giving developers a useful view of the early loading experience.

Improving FCP requires attention to the complete critical rendering path. Faster server responses, efficient HTML, optimized CSS, smaller JavaScript bundles, appropriate image and font loading, effective caching and carefully selected resource priorities can all help the browser reach its first paint sooner.

FCP should be analyzed together with other performance metrics such as LCP, INP and CLS. A fast first paint is valuable, but the ultimate goal is a page that becomes useful quickly, displays its main content promptly, responds smoothly to interaction and remains visually stable throughout the loading process.

Found an issue?

Found an error, outdated information, or something missing from this article? Let me know through the Contact page.

Your feedback helps improve our articles and keep them accurate and useful.