Skip to main content
Guides/Site Performance

Page Weight: Understand and Use the Results

Analyze page size and resource breakdown

EdgeDNS Team·Updated ·5 min read

Page weight: the total cost of loading a single page

Page weight is the total number of bytes a browser has to download to fully render a single page — every HTML document, every CSS file, every JavaScript bundle, every image, every font, every video, every analytics beacon. It is one of the simplest possible measures of performance: just add up the sizes. And it correlates surprisingly well with how a page actually feels. Heavy pages are slow on poor connections, slow on old devices, and expensive on metered data plans. Light pages are fast for everyone, everywhere.

You should care because the average web page in 2025 is around 2-3 MB on desktop and 2 MB on mobile, according to the HTTP Archive's Web Almanac. That is enormous — twenty years ago, the average page was under 100 KB. Almost all of the growth has come from JavaScript, images, and third-party scripts (analytics, ads, A/B testing, customer support widgets). The fastest pages on the web today, by deliberate choice, weigh under 200 KB total. The difference in user experience between a 200 KB page and a 5 MB page is enormous on any connection that isn't a wired desktop in a major city.

The five things every page-weight audit looks at:

  • Total weight. The simple sum, in kilobytes or megabytes.

  • Weight by type. How much is HTML, CSS, JavaScript, images, fonts, video, and "other"? The breakdown reveals where the bloat lives.

  • Number of requests. How many separate files make up the page? Each request has its own latency cost.

  • Third-party weight. How much of the page is your own code vs. external scripts you've embedded? Third-party content is often the biggest source of bloat.

  • Compressed vs uncompressed sizes. A 200 KB compressed page can decompress to 600 KB in memory; the compressed size is what travels the network, but the uncompressed size matters for parsing time.

Three questions a page-weight audit answers:

  • How big is my page actually, and how does that compare to the median for my industry?

  • Where is the weight coming from — my own code, my own images, or third-party scripts I no longer remember adding?

  • Which single file or third-party script could I remove for the biggest size win?

The cost of ignoring page weight is the slow accumulation of bloat that nobody notices until the page hits 5 MB and customers in slow markets complain. The fix is a periodic audit, ruthless removal of unused dependencies, and a performance budget — a hard limit (say, 1 MB) that engineering treats as a non-negotiable constraint. The most useful public reference for industry benchmarks is the HTTP Archive's Web Almanac, which publishes annual data on page weight trends.

The Page Weight endpoint, in plain language

Analyze page size and resource breakdown

Page weight directly impacts load time, data costs, and Core Web Vitals (Google Core Web Vitals). Understanding which resource types contribute most to page weight helps prioritize optimization efforts for the biggest impact.

What is actually happening when you call it

Fetches the page and all its resources, measuring the size of each resource type. Breaks down page weight by JavaScript, CSS (Cascading Style Sheets), images, fonts, and other assets. Identifies render-blocking resources, lists the largest resources, and estimates load times for slow 3G, regular 4G, and broadband connections.

Why this specific tool matters

Choose a task: Performance Optimization. Identify the largest resources and resource types contributing to slow page loads.

Run the Page Weight request below and retain the input and observed result. Before changing configuration, compare the relevant fields with the value or policy you expected. Use the Page Weight reference to check the field definitions and supported options.

Info:

Available on the developer plan. The technical details: `GET /v1/domain/page-weight`.

When would I actually use this?

Performance Optimization

Identify the largest resources and resource types contributing to slow page loads.

Use the finding: Focus optimization on the highest-impact resource types.

Budget Monitoring

Track page weight over time to ensure it stays within performance budgets.

Use the finding: Prevent page bloat from creeping in with new features.

Mobile Optimization

Analyze page weight with estimated load times on 3G/4G to ensure acceptable mobile performance.

Use the finding: Optimize for mobile users on slower connections.

The easiest way: just ask your AI assistant

Connect the MCP server. Just ask in plain English:

Use domain_page_weight with domain=https://example.com. Show the returned findings, identify unavailable evidence, and explain a useful next check.

Confirm the tool and inputs in the client before accepting its summary. For Page Weight, use the response fields below to separate observations from recommendations.

Tip:

The dedicated MCP server is available on every plan. Individual tool access and request limits depend on your plan. Management categories and endpoints disabled for the tool catalog are not exposed through MCP.

The technical way: call it from code

This Page Weight request uses the example inputs from its API contract. Replace YOUR_API_KEY with a key on the developer plan or higher; adapt the target to your task.

bash
curl --request GET 'https://api.edgedns.dev/v1/domain/page-weight?domain=https%3A%2F%2Fexample.com' \
  --header "Authorization: Bearer YOUR_API_KEY"

Prepare inputs for Page Weight

Start with the inputs below. Keep the same hostname, path, and options when comparing Page Weight observations. The API reference contains the complete parameter contract, optional settings, and access requirements.

FieldTypeRequired?What it meansExample

domain

string

Yes

Domain or full URL (web address) — accepts `example.com` or `HTTPS://example.com/path`.

https://example.com

Interpret Page Weight findings

Read these fields alongside the full response from your Page Weight check. A missing value or failed lookup is different from a passing result. Keep returned errors and confidence or cache metadata when available; do not replace missing evidence with a successful default. See the complete response reference for additional fields.

FieldTypeWhat you'll see in it

domain

string

The analyzed domain (bare hostname).

url

string

Full URL (web address) that was fetched, echoing the protocol used in the request.

coverage

string

Analysis coverage indicator — "static-html-only". JavaScript-injected resources are not visible to non-rendering analysis

Words you might be wondering about

CSS (Cascading Style Sheets) — The language used to control how a web page looks — colors, fonts, spacing, layout. HTML says what content is on the page; CSS says how it looks.

Core Web Vitals (Google Core Web Vitals) — Google's official measurements of how fast and smooth your web pages feel — how quickly content appears, how long the page takes to become interactive, and how stable the layout is. Used as a search ranking signal.

Need Programmatic Access?

Automate domain intelligence with 100+ API endpoints and a free MCP server for AI integration.

Page Weight: Results Guide | EdgeDNS