Many modern websites are built with JavaScript frameworks such as React, Vue or Angular. Some of them are built as a “single-page app”: the site behaves more like an application than a set of pages. That can feel quick once it is running, but it changes what a visitor downloads on their first visit, and therefore what a website carbon test measures. This article explains the idea in plain terms, so you can have a useful conversation with whoever built your site.
What a single-page app is
MDN, Mozilla's web reference, defines a single-page application as one that “loads only a single web document” and then updates its content with JavaScript when a visitor moves to different content. Instead of fetching a fresh page from the server for every click, the browser keeps one page open and swaps the content in and out.
MDN notes the benefits (a more dynamic experience, without loading whole new pages) and the trade-offs, which include search engine optimisation, extra effort to manage navigation, and harder performance monitoring.
Why the first load carries the weight
In the purest form of a single-page app, the server sends a nearly empty HTML page plus the JavaScript that builds everything else. Google's guide to rendering on the web calls this client-side rendering, where “all logic, data fetching, templating, and routing are handled on the client”. It also warns that the amount of JavaScript needed “tends to grow as an application grows”.
For a small business site, that can mean a visitor who only wants your opening hours downloads the code for the whole site: the contact form, the gallery, the blog and every page in between. Their browser then has to run that code before the text appears.
A quick way to see how your site is built: open a page in Chrome, open DevTools and use the Command Menu to disable JavaScript, then reload. If the page is blank or nearly blank, it relies on JavaScript to show its content. If your words and images are still there, it is sending real HTML.
Server rendering and static generation, plainly
The same web.dev guide describes the main alternatives. In everyday terms:
- Server-side rendering. The server builds the finished HTML for each request and sends that, rather than leaving the browser to build it. web.dev says this “lets you avoid sending lots of JavaScript to the client”.
- Static rendering (often called static site generation). Each page is built once, ahead of time, as its own HTML file. web.dev says this “offers a fast FCP, and also a lower TBT and INP”, as long as client-side JavaScript is kept small, but notes it can be hard where you can't predict every page address in advance.
- Hydration. Many frameworks send server-rendered HTML and then run JavaScript to make it interactive. web.dev warns that such pages “can appear to be loaded and interactive, but can't actually respond to input” until that script has run, so server rendering does not automatically mean less JavaScript.
web.dev's overall advice is to “consider server-side rendering or static rendering over a full rehydration approach”. Where a large app is unavoidable, it recommends code splitting: sending only the code needed for the first page and loading the rest when it is needed. Our article on finding unused JavaScript shows how to see how much of a script a page actually uses.
What a single first-load test sees
GreenTracer measures one initial, uncached load of the page with Google PageSpeed Insights, on mobile and desktop, and uses the heavier of the two runs. It does not scroll, click or move between pages. For a single-page app, that has some clear consequences:
- Captured: the HTML, the main JavaScript bundle and anything the app fetches while building the first screen, such as data, fonts and images.
- Not captured: anything the app loads later, when a visitor clicks to another view. Code or data fetched only on those later steps isn't in the result.
- Not captured either: the benefit for repeat visitors. Files already saved by the browser aren't counted because the test is uncached; see browser caching explained.
So the result describes a first visit to that one address. That is a fair view of a visitor arriving from a search result or an advert, which is how many people meet a small business site. It is not the full picture of a long session inside the app. Under the Sustainable Web Design Model v4, every 1 MB removed from that first load lowers the estimate by about 0.148 g CO₂e per page view (about 0.121 g on a host listed as green). You can see how page weight lines up with each grade on the rating page.
Questions for your web person
- Is the site rendered in the browser, on the server, or built as static pages ahead of time?
- Do the pages people land on most (home, services, contact) need to be an app at all, or could they be static HTML with small pieces of interactivity?
- Is the JavaScript split by page, so the home page doesn't carry code for the whole site?
- If the site is server-rendered, how much JavaScript still runs to hydrate each page?
Moving framework is a big job and rarely the first step. Often the quickest wins are elsewhere: images, fonts, and third-party tags. After any change, check the page again and compare the bytes measured with your earlier report, which keeps previous checks as history.



