---
title: "Tech Tip #7: Weigh your web page (video)"
description: "We cut our home page from six point eight megabytes to one point seven."
url: https://greencode.ai/shorts/7-weigh-your-web-page/
---

# Tech Tip #7: Weigh your web page (video)

## Tech Tip #7: Weigh your web page

**We cut our home page from six point eight megabytes to one point seven.**

[Watch the video](https://media.greencode.ai/shorts/weigh-your-web-page-3dba41491ba5.mp4)

Video created by [explainapaper.com](https://explainapaper.com/?utm_source=greencode.ai&utm_medium=film&utm_campaign=made-by)

### The problem

Pages grow by accretion: a slider plugin here, a second copy of jQuery there, full-size images everywhere. Every visitor downloads all of it, on every first view.

### The fix you can use today

- Measure a first view: bytes and requests, with a real browser.
- Remove scripts a page does not use and purge unused CSS.
- Recompress images, serve WebP or AVIF, and lazy-load what is below the fold.

That is GreenCode's own website, measured before and after the rebuild.

### Tools that help

- [Lighthouse](https://developer.chrome.com/docs/lighthouse/overview?utm_source=greencode.ai&utm_medium=referral&utm_campaign=greencode): audits a page for total byte weight, unused JavaScript and CSS, image formats and offscreen images
- [WebPageTest](https://www.webpagetest.org/?utm_source=greencode.ai&utm_medium=referral&utm_campaign=greencode): loads a real page and shows every request, its size and when it loaded
- [CO2.js](https://developers.thegreenwebfoundation.org/co2js/overview/?utm_source=greencode.ai&utm_medium=referral&utm_campaign=greencode) (Green Web Foundation): an open-source library that turns bytes transferred into an estimate of CO2, using the Sustainable Web Design model

### How GreenCode helps

GreenCode helps tackle this by practising it on greencode.ai: static pages, WebP images, scripts only where they are used and purged styles cut a first view of the home page from 80 requests to 33. [More on this](https://greencode.ai/green-hosting/).

### Tags

#web-performance#images#javascript#frontend

### Sources

- [Green hosting and this site's footprint (6,766 KB over 80 requests to 1,719 KB over 33)](https://greencode.ai/green-hosting/)
- [Green Software Foundation, Green Software Patterns: Keep request counts low](https://github.com/Green-Software-Foundation/patterns/blob/main/docs/development/web-performance/keep-request-counts-low.md?utm_source=greencode.ai&utm_medium=referral&utm_campaign=greencode)
- [HTTP Archive, Web Almanac 2025, Page Weight: median home page 2.9 MB desktop, 2.6 MB mobile](https://almanac.httparchive.org/en/2025/page-weight?utm_source=greencode.ai&utm_medium=referral&utm_campaign=greencode)
- [W3C, Web Sustainability Guidelines: minify code and remove unused CSS and JavaScript](https://www.w3.org/TR/web-sustainability-guidelines/#remove-redundancy)

### Transcript

We cut our home page from six point eight megabytes to one point seven. That is GreenCode's own website, measured before and after the rebuild. Web pages grow bit by bit. A slider plugin here, a second copy of a script there. And full-size images everywhere. Every visitor downloads all of it, on their first visit. Every byte uses energy in the data centre, the network and your phone. Here is the fix you can use today. First, weigh a first visit in a real browser: bytes and requests. Remove the scripts a page does not use. Cut out the styles nobody uses. Shrink your images, use modern formats, and load images further down only when needed. Find what to cut using tools like Lighthouse and WebPageTest. GreenCode helps tackle this by practising it on its own site. Our page went from eighty requests to thirty-three. The Green Web Foundation's library turns those bytes into a carbon estimate. We estimate about a fifth of a gram of carbon dioxide per view. That was GreenCode Tech Tip number seven. Follow for the next tip, and find more on greencode.ai/tech-tips.

[The tip in full](https://greencode.ai/tech-tips/7-weigh-your-web-page/)

[« Tech Tip #6: Count your AI coding assistant's footprint](https://greencode.ai/shorts/6-count-ai-coding-footprint/)[Tech Tip #8: Slim your container images »](https://greencode.ai/shorts/8-slim-your-container-images/)

[All GreenCode Tech Tips](https://greencode.ai/tech-tips/) · [All GreenCode videos](https://greencode.ai/videos/)

#### Key Facts

- Tip **#7**
- For **Developers**
- Length **1:12**
- Category **Web and front-end**
![GreenCode](https://greencode.ai/wp-content/uploads/2024/12/greencode-logo-website-small-colours-2.webp)

Want this checked on your own system? Talk to the GreenCode team.

[Get in touch](https://greencode.ai/contact/)
