We cut our home page from six point eight megabytes to one point seven.
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.
That is GreenCode's own website, measured before and after the rebuild.
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.
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.
Share this