Skip to main content

Make Your First Page Paint Faster on a Slow Link

The LCP number shows how fast the main part of your page loads. This guide shows how to send the first bytes soon, shrink the rest, and turn on Brotli and early hints.

Cover image for Make Your First Page Paint Faster on a Slow Link

Largest Contentful Paint (LCP) shows when the main page loads. A slow host adds lag. The browser cannot draw a pixel yet.

Google uses LCP to rank pages. The goal is 2.5 seconds or less. On phones in India, slow hops add lag. If the host waits to send key files, your rank drops.

You can fix this on a Linux VPS. You do not need heavy code. You need fast headers, small files, and close hosts. This guide shows how to tune your host for top speed.

The four parts of LCP.

An LCP score has four parts. Each part adds to the total wait:

  1. Time to First Byte (TTFB): Wait for the first byte of HTML.
  2. Resource load delay: Wait before the browser pulls key files.
  3. Resource load duration: Time to pull the main file or font.
  4. Element render delay: Time to paint the main image on screen.

Most teams check just the fourth part. They shrink images or cut script size. But host lag makes up more than half of the wait.

Request stageFar host (Gzip)Tuned Indian VPS (Early Hints, Brotli)Time saved
First byte wait280 ms45 ms-235 ms
File load delay220 ms15 ms-205 ms
File download time340 ms110 ms-230 ms
Screen render time90 ms60 ms-30 ms
Total LCP score930 ms230 ms-700 ms (75% faster)

The tuned stack now takes 700 ms less. That puts your site in the top tier.

What is a good LCP score for search rank?

Short answer: Under 2.5 seconds is good. From 2.5 up to 4.0 needs work. Over 4.0 is poor.

Google tests real visits through the Chrome User Experience Report (CrUX). Google looks at the top 75% of visits. One in four phone users waits too long? Your site fails.

A slow site hurts your rank. Fast sites win more clicks.

AI search bots test site speed. Bots like OAI-SearchBot and PerplexityBot work on tight time limits. A slow host makes the bot skip. It goes to a rival site instead. A fast host helps AI bots quote your text.

How HTTP 103 Early Hints cuts file wait.

Short answer: Early hints tell the browser to pull files early. The host still builds the page at the same time.

Under standard HTTP, the browser waits for the full reply. While your app runs DB queries, the link sits idle.

The RFC 8297 rule adds a new code: 103 Early Hints.

When a call comes in, Nginx sends a 103 code at once. This quick pack holds Link headers with rel=preload.

Client                          Nginx Server                    PHP / Node Backend
  |                                  |                                  |
  |--- GET /page.html -------------->|                                  |
  |                                  |--- Pass request to backend ----->|
  |<-- 103 Early Hints (preload) ---|                                  |
  |    (Client downloads CSS & font) |                                  |
  |                                  |                                  |
  |                                  |<-- 200 OK + full HTML -----------|
  |<-- 200 OK + full HTML -----------|                                  |

The browser pulls your CSS sheet and font while your app works. By the time the HTML arrives, the styles sit on disk. This step cuts file wait to near zero.

Nginx setup for HTTP 103 Early Hints.

You can turn on early hints in Nginx. Add preload headers inside your site block.

Open your site conf file:

# /etc/nginx/conf.d/webhost24.conf

server {
    listen 443 ssl http2;
    listen [::]:443 ssl http2;
    server_name example.com;

    # SSL certificates and parameters
    ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem;
    ssl_protocols TLSv1.2 TLSv1.3;

    # Root web path
    root /var/www/html;
    index index.html index.php;

    # Send 103 Early Hints with critical assets
    location / {
        # Preload critical layout stylesheet
        add_header Link "</assets/css/main.min.css>; rel=preload; as=style" always;

        # Preload main heading font
        add_header Link "</assets/fonts/inter-bold.woff2>; rel=preload; as=font; crossorigin" always;

        # Forward dynamic requests to upstream backend
        try_files $uri $uri/ /index.php?$args;
    }

    # Cache static assets on disk with long TTL
    location ~* .(css|js|woff2|webp|avif)$ {
        expires 365d;
        add_header Cache-Control "public, no-transform, immutable";
        access_log off;
    }
}

This block tells the client to pull the style sheet and font at once.

Brotli for small files.

File size shapes the pull time. Most hosts still use old Gzip. Brotli (RFC 7932) packs text much tighter.

For web text, Brotli brings big gains:

  • CSS code is 15% to 20% less than Gzip.
  • JavaScript code is 12% to 18% less than Gzip.
  • HTML pages are 18% to 25% less than Gzip.

Tiny files load fast on phone cell towers. This cuts the third part of your LCP score.

Turn on Brotli in Nginx.

On Ubuntu or Debian, install Brotli:

sudo apt update
sudo apt install -y libnginx-mod-http-brotli

Next, add these to /etc/nginx/nginx.conf:

# Enable Brotli compression inside the http block
brotli on;
brotli_comp_level 6;
brotli_static on;
brotli_types
    text/plain
    text/css
    text/xml
    application/javascript
    application/json
    application/xml
    image/svg+xml;

We set the level to 6. It gives the best mix of small size and low CPU use. Levels above 7 use too much CPU on live calls.

The static line sends files that already have a .br tag. They come straight off disk. This saves chip work on busy hosts.

Kernel socket tuning.

The Linux kernel sets how bytes leave the card. Stock rules pick low RAM use over top speed.

Tune socket buffers. You send large web pages in fewer round trips.

Add these to /etc/sysctl.d/99-web-tuning.conf:

# Do not drop TCP window size after idle connections
net.ipv4.tcp_slow_start_after_idle = 0

# Enable TCP Fast Open for client connections
net.ipv4.tcp_fastopen = 3

# Enlarge network socket read and write buffers
net.core.rmem_max = 16777216
net.core.wmem_max = 16777216
net.ipv4.tcp_rmem = 4096 87380 16777216
net.ipv4.tcp_wmem = 4096 65536 16777216

# Increase network backlog queue for burst traffic
net.core.netdev_max_backlog = 10000
net.core.somaxconn = 8192

Load the new rules without a reboot:

sudo sysctl --system

Turning off slow start stops the host losing speed after a pause. This keeps data flow high for linked files.

Step-by-step test guide.

Save your work. Then run tests on each tool. Use plain shell tools.

1. Test Early Hints.

Run curl on your site:

curl -I -X HEAD https://example.com/

Look at the shell output. You will see Link lines with rel=preload tags:

HTTP/2 200
server: nginx
content-type: text/html; charset=UTF-8
link: </assets/css/main.min.css>; rel=preload; as=style
link: </assets/fonts/inter-bold.woff2>; rel=preload; as=font; crossorigin
cache-control: max-age=3600, public

2. Check Brotli output.

Pull your main style sheet with Brotli turned on:

curl -s -I -H "Accept-Encoding: br" https://example.com/assets/css/main.min.css

Look for the encoding line:

content-encoding: br

If you see br, Brotli works fine.

3. Check TCP Fast Open status.

Check that your Linux kernel took the socket rule:

sysctl net.ipv4.tcp_fastopen

The shell will print net.ipv4.tcp_fastopen = 3.

Common questions.

Does a CDN replace tuning?

In short: No, a CDN just caches static hits. Your own host runs live content.

When an edge node misses, the call hits your own host. If that host is slow, the guest waits. Search bots and users who sign in skip edge caches too. Your fast host shields your site in all cases.

Can I preload art with 103 Early Hints?

Quick take: Yes. You can preload the hero image with a Link header.

Add this line inside your Nginx block:

add_header Link "</images/hero.webp>; rel=preload; as=image" always;

Preload only the hero image above the fold. Too many preloads eat phone data. Your page slows down.

Why pick Brotli over Gzip for web fonts?

In short: Web fonts pack their own bytes. Plain text gains big size drops.

WOFF2 fonts ship packed. But CSS and HTML text drops 20% in size with Brotli. Small files reach the phone fast.

How does a host in India lift LCP?

Quick take: A host near your guests cuts line lag.

Light through glass is slow. A host in the west adds 150 ms of lag per round trip. In India, a local host cuts the wait to 25 ms or less. That drop lifts LCP on phones across India.

Does LCP sway ranks in AI search engines?

In short: Yes. AI search bots reward low lag with more citations.

AI bots pull web text in real time. If a page needs three seconds to load, the bot gives up. A fast host makes sure bots read and quote your text.

Next steps for your setup.

Fast web speed starts with smart host rules. Pair 103 Early Hints with Brotli and kernel tuning. You then cut lag from each visit.

Want a faster reply? Read our guide on TTFB tips. For live web apps, read our INP tips. See also how fast local storage cuts disk wait.

Want fast web hosts in India? Check our app hosting plans. We offer month-to-month terms. You get a 30 days money-back guarantee. You get 7-day backup retention. Text our team on WhatsApp to chat today. Or visit our contact page.

Written by

Renish Mithani

Hosted in India, written in English

  • 10 min read

Share this post

Need help?

Ask us on WhatsApp

Our team replies during Indian business hours. Ask us anything about hosting, and we will help. We are the people who run the servers, so we can answer the hard ones too.

That is the end of this post. If you want to keep reading, the posts below are the ones we share with it. We write every post ourselves, and each one stands on its own.

We write about hosting, servers, backups, and the day to day work of running a site for a customer. There is no sales pitch in a post, and every post is free to read.

We write them for the people who run a site from India, and we keep the words plain. We do not write for a prize, and we do not sell you anything here. Read the post, take what you need, and ignore the rest.

Related posts

We rank these by the tags they share with the post you came from. Read one to learn more. Every post is free to read.

Cookie Preferences