A newsletter is one of the most useful things a small business can build, and a popup is the usual way sites ask for it. Popup and sign-up tools are often added in minutes: paste a snippet into the site header, choose a design, done. That snippet then runs on every page, for every visitor, including the ones who have already signed up, the ones who will close the box, and the ones it never appears to at all. This article looks at what that costs and how to ask more lightly.
What a popup tool loads
A hosted popup tool is third-party code. To decide whether and when to show the box, its script usually has to load first, often with its own styles, fonts and the image in your design. A popup set to appear after a delay, on scroll or when the mouse heads for the close button still needs that script waiting in the page.
That matters for a carbon check. GreenTracer measures one initial, uncached load of the page with Google PageSpeed Insights, without scrolling or clicking. So whatever the tool downloads during that first load is counted, even if the popup itself never opens during the test. web.dev's guide to loading third-party JavaScript is direct about the principle: if a script doesn't add clear value to your site, remove it. It also notes that loading many scripts asynchronously won't stop them slowing the page. If the tool is held back by your cookie banner, see cookie banners, tags and your carbon test.
See what yours brings with it
- Open a typical page, such as a blog post, in a private window. Open Chrome DevTools, choose the Network panel, tick “Disable cache” and reload.
- Type the popup provider's name or domain into the filter box. Note how many files appear and the size of each.
- Ask whether the tool loads on pages where you would never want a sign-up box: checkout, contact, privacy policy, the thank-you page after someone has just subscribed.
- If you have several tools doing similar jobs, for example an old popup plugin and a newer email platform form, check both. Leftovers happen; our guide to finding unused JavaScript shows how to spot code that downloads but never runs.
To give a sense of scale: if a tool adds 200 kB to the first load of every page, the Sustainable Web Design Model v4 puts that at about 0.030 g CO₂e per page view (about 0.024 g on a host listed as green). That is illustrative arithmetic, not a measurement of any particular product. Across every page view on the site, it adds up.
Load it when someone asks
The lighter pattern is to show something small and plain, such as a “Get our newsletter” button, and load the full sign-up form only when someone presses it. web.dev's lesson on code splitting describes this as importing code “in response to an interaction”, so it is downloaded only when it is most likely to be used, and says that keeping startup code small can improve how quickly the page responds.
- Ask your provider first. Check whether your email platform offers a plain embedded form or a hosted sign-up page as well as a popup script. A link to a hosted page loads nothing until it is clicked.
- Limit where it runs. If the tool lets you choose pages, keep it to the places where readers are most likely to want it, such as blog posts, rather than the whole site.
- Keep the popup image small. If you keep a design with a photo, treat it like any other image on the site; see image weight: the quickest win.
Or skip the popup altogether
A short form at the end of a blog post, or a slim banner, asks at the moment someone has finished reading, without covering anything. Google Search Central's guidance on intrusive interstitials and dialogs warns that elements which obstruct the view of the content can make it harder for search engines to understand a page. It recommends banners that take up only a small fraction of the screen instead, and mentions newsletter sign-ups as one use for them. A plain HTML form needs no extra script at all to display.
If you keep a modal, make it accessible
A popup that covers the page is a modal dialog, and it has to work for people using a keyboard or a screen reader. The W3C's modal dialog pattern sets out what that means:
- When it opens, focus moves inside it, and Tab doesn't move focus out to the page behind.
- Escape closes it, and focus returns to whatever opened it.
- It has a label, usually its visible title, and a visible close button is strongly recommended.
Modern browsers do much of this for you. MDN's page on the dialog element explains that a <dialog> opened with showModal() makes the rest of the page inert, moves focus inside and can be closed with Esc. MDN still advises including an explicit close button, and notes that a custom-built dialog has to recreate all of these behaviours itself. Ask your provider how their popup handles focus and the Esc key, and try it yourself with only the keyboard.
<button id="open-signup">Get our newsletter</button>
<dialog id="signup" aria-labelledby="signup-title">
<h2 id="signup-title">Monthly news from the shop</h2>
<!-- your email platform's plain form here -->
<form method="dialog">
<button autofocus>Close</button>
</form>
</dialog>
<script>
const signup = document.getElementById("signup");
document.getElementById("open-signup")
.addEventListener("click", () => signup.showModal());
</script>The short script opens the dialog with showModal(). The close button sits in a form with method="dialog", which MDN describes as the built-in way to close a dialog without extra JavaScript; Esc also closes it.
Check what changed
Make one change at a time and repeat the Network panel check. Then press your new button to make sure the form still loads and submits correctly, on a phone as well as a desktop. Finally, check the page again and compare the bytes measured with the previous report; earlier checks are kept as history. If you want to see how a lighter page relates to the grades, the rating scale shows the thresholds.
Sources
- web.dev: efficiently load third-party JavaScript
- web.dev Learn Performance: code-split JavaScript
- Google Search Central: avoid intrusive interstitials and dialogs
- W3C WAI ARIA Authoring Practices Guide: dialog (modal) pattern
- MDN: the dialog element
- Sustainable Web Design: estimating digital emissions (SWDM v4)



