Page Resource Size Analyzer — Inspect HTML, Image, CSS and Script Responses

A page resource size analyzer inventories image, stylesheet, and script URLs declared in a webpage’s HTML and can measure a limited sample of their HTTP response bodies. It reports the number of discovered assets, which resource responses were actually received by the server inspector, and how their measured bytes are distributed by type. Unrequested assets, blocked downloads, and dynamically loaded resources are not represented as zero-byte files or invented transfer savings.

Page Resource Size Analyzer

Preparing tool controls…

A page resource size analyzer inventories image, stylesheet, and script URLs declared in a webpage’s HTML and can measure a limited sample of their HTTP response bodies. It reports the number of discovered assets, which resource responses were actually received by the server inspector, and how their measured bytes are distributed by type. Unrequested assets, blocked downloads, and dynamically loaded resources are not represented as zero-byte files or invented transfer savings.

Web Page Size Checker At a Glance

PropertyWhat to expect
Resource typesImages, external stylesheets, external script files
Collection scopeHTML-declared resource references
SamplingSelect 4, 8, or 12 resource requests
MeasurementComplete identity-encoded HTTP response-body bytes returned to PHP
Known exclusionsCached browser transfers, runtime requests, compression and CSS imports

What Page Size Numbers Actually Represent

A webpage is rarely a single file. The initial HTML document can reference images, external CSS files, JavaScript bundles, fonts, media, and additional assets discovered only when scripts execute or stylesheets are parsed. A report claiming one total page weight without stating its collection method can be misleading. This analyzer separates the size of the fetched HTML response from a sampled set of declared image, stylesheet and script responses. It shows what was requested and what was not, and it does not add unknown bytes to its totals. That distinction matters when two pages appear similar visually but use different loading behavior, third-party assets, and network strategies.

A sampled response-body byte count is not the same as the size transferred to a visitor's phone. The endpoint requests resources with identity content encoding, while a normal browser may negotiate gzip or Brotli, reuse cache entries, serve optimized image formats, or load alternate srcset candidates. Network protocols also add response headers and transport overhead that a body-length measurement excludes. Interpret measured bytes as controlled origin response observations from the inspection server, not as browser performance telemetry. A zero measured total means no supported resource completed measurement, not that the website requires zero bytes to render.

How Resource Discovery Works from HTML Markup

The page inspector downloads static HTML through the existing restricted PHP service. The analysis then looks for script elements with src attributes, stylesheet links with rel=stylesheet, and images with src attributes. Relative references are resolved against the final page URL, and duplicates are removed for the sampled inventory. The tool can include resources served from other origins, which is useful for finding a third-party script or image host that contributes to the page. The displayed URL makes origin differences clear, but it does not infer business ownership or privacy characteristics merely from a domain name.

This inventory is intentionally narrower than what a real browser loads. It does not execute JavaScript, follow lazy-loading logic, apply responsive img srcset choices, crawl CSS @import rules, enumerate background-image URLs, or include fonts referenced inside stylesheets. The initial HTML may reference ten assets while a later user interaction triggers dozens more. Conversely, scripts marked for conditional loading might never execute on a given device. The analyzer reports declared references and sampling rules explicitly because raw HTML is only one layer of the resource graph. An image alt text audit considers a different property of the same markup: descriptive attributes rather than network payload size.

Measuring a Bounded Resource Sample Safely

Choose the sample limit before starting the inspection. The analyzer can request the first four, eight, or twelve unique supported assets, in document collection order by type. The PHP endpoint validates each resolved hostname, pins a publicly routable IPv4 address to the request, checks robots.txt policies, limits redirects and the maximum response length, and applies the same rate controls used for other website inspections. This is a deliberately limited public diagnostic, not an unrestricted crawler. An asset with a blocked robots policy, a timeout, a non-200 status, or a response exceeding the permitted size is marked unavailable instead of assigned a fictitious byte value.

For example, imagine the first sample includes two stylesheets, one script and one image. If the two stylesheet responses contain 28,000 and 42,000 bytes, the script contains 180,000 bytes, and the image request is blocked, the measured subtotal is 250,000 bytes. The image remains an unmeasured entry, so that subtotal is not presented as the complete page's cost. Increasing the sample may uncover more sources but also raises the inspection load and time required. Public sites that block automated requests or hide assets behind authentication may be unsuitable for live measurement, and the tool will not bypass those restrictions.

Comparing Images, CSS, and JavaScript Responsibly

The breakdown is useful for locating the files that dominate the measured sample. Large image responses may suggest reviewing pixel dimensions, compression, format choice, and responsive variants. Large JavaScript responses may prompt a bundle audit, code splitting, dependency review, or deferred loading. CSS size alone does not reveal whether styles are actually used or whether render-blocking behavior is occurring; that requires separate performance profiling. Two images with the same transfer size can also have very different rendering cost depending on dimensions, decoding behavior and device capabilities. Treat response bytes as one input into the performance investigation rather than the final optimization decision.

When comparing revisions of a site, use the same public URL, sample size, and inclusion settings where possible. A change in server output, third-party asset order, personalization, redirect target or bot treatment can shift which URLs enter the sample. Even successful repeat measurements can vary due to deployment changes and content updates. Export the full report, including unresolved URLs, to retain the context behind totals. If you need to inspect the document-level structure that determines which images have alternative text, the website heading auditor and related structural checks complement but do not substitute for network diagnostics.

Restrictions, Failures, and Browser Performance Data

The analyzer does not measure cache hit rates, actual mobile latency, real-user network conditions, first contentful paint, layout shifts, or the time until a page becomes interactive. These require browser instrumentation and may involve data from controlled lab tests or field measurements. A resource size reduction can improve certain outcomes, but a smaller transfer does not guarantee that critical rendering occurs sooner. A script can be small yet block the main thread, and a larger image can arrive efficiently if it is appropriately prioritized and cached. Optimizing for measured user experience requires understanding the dependency chain, not merely sorting files from largest to smallest.

Live measurement also depends on the remote server's robots settings, public DNS, HTTPS configuration, response code, and willingness to serve an automated PHP client. The endpoint does not follow authenticated sessions, send stored visitor cookies, or claim success if it cannot complete a response. Very large resources are intentionally excluded by the response limit, and skipped or failed entries remain visible. Offline pasted HTML can reveal declared assets but cannot supply trustworthy transfer byte counts without requesting them. For deeper response investigation, an HTTP status checker may help identify a redirect or access restriction affecting a particular resource, but it is not a replacement for measuring a real browser load.

Using the Results to Prioritize Follow-Up Work

Suppose a sampled page contains a relatively small stylesheet and several much larger photographs. That observation supports inspecting image dimensions and source variants first, but it does not prove the stylesheet has no rendering impact. Conversely, a large script response may be served from a cache for returning visitors while still imposing parsing and execution costs on a first visit. Resource size is one axis of performance and should be interpreted alongside loading priority, compression, cache policy and the main thread's work.

The distinction between discovered, sampled, and measured resources should remain visible in every exported report. If twenty assets are discovered but only four are requested, the result has four opportunities for a measured byte count; the other sixteen are not zero-byte assets. If one of those four fails, there are only three complete observations. Keeping these denominators explicit makes comparisons fairer and avoids converting the limitations of a partial HTTP inspection into overstated performance conclusions.

Frequently Asked Questions

Does the total represent all data a visitor downloads?

No. It is the sum of successfully downloaded response bodies in a bounded sample, plus a separately reported HTML response length. It excludes other asset types, dynamically requested files and browser-specific loading decisions.

Why does a resource appear without a byte count?

It may have been outside the sample, blocked by robots.txt, unreachable, redirected to an unsupported target, too large, or rejected by server safety controls. Unknown is not the same as zero.

Are the measured bytes compressed network transfer bytes?

No. The PHP inspection client requests identity encoding and counts complete response-body bytes. A browser may use a compressed representation or cached response, and transport headers add separate overhead.

Can this tool detect all JavaScript and CSS dependencies?

Not in static HTML. It collects external script and stylesheet declarations visible in the source. Dynamic imports, stylesheet imports, runtime bundles and conditional loading require browser network tooling.

Why is there a limit of twelve assets?

Live resource requests consume network resources and can trigger abuse protections on destination sites. Bounding the inspection and response size reduces load and makes partial results easier to interpret.

Can I inspect a local HTML file?

Yes, for declared URLs and structural inventory. The offline mode does not invent transfer measurements because a source file does not contain remote response byte counts, network compression settings, or cache conditions.

Conclusion

A useful page-size report begins with explicit measurement boundaries. Inspect which assets are declared, compare the bytes actually retrieved, and keep failures and omitted files visible. Follow large-response findings with browser performance measurements before making decisions about speed, caching, and loading order.