Course contentsShow
← Web Development
Lesson 2139 of 2,98239. Network PerformanceFree lesson

Verifying Compression in DevTools

Use browser DevTools Network panel to verify resources are compressed, check encoding, and measure savings.

Verifying Compression in DevTools

You'll learn: how to use your browser's DevTools Network panel to confirm that your text resources are being compressed and measure the actual bandwidth savings.

Why Verify Compression?

After configuring compression on your server, you need to confirm it's actually working. Just because you enabled Gzip or Brotli doesn't guarantee every resource is being compressed correctly. Think of it like checking your receipts after applying a coupon—you want proof you got the discount.

How to Check in DevTools

Open your browser's DevTools (F12 or right-click → Inspect), then navigate to the Network panel. Refresh the page to capture all requests.

Look for the Encoding Header

Click on any text resource (HTML, CSS, JS, JSON). In the Headers tab, scroll to the Response Headers section. Look for:

content-encoding: gzip

or

content-encoding: br

If you see gzip or br (Brotli), that resource is compressed. If this header is missing, the resource was sent uncompressed.

Measure the Savings

In the Network panel's main view, look at the Size column. Many browsers show two values:

  • Transferred size (smaller number) — actual bytes sent over the network after compression
  • Resource size (larger number) — uncompressed size

For example: 45 kB / 180 kB means you saved 135 kB of bandwidth—a 75% reduction!

Filter by Type

Use the filter buttons (JS, CSS, Doc) to quickly check that all your text resources show compression. Images and fonts should typically show similar sizes (already compressed formats).

Key Takeaway: DevTools Network panel lets you verify compression by checking the content-encoding header and comparing transferred vs resource sizes—essential for confirming your optimization works in production.