Why send the same bytes a million times?
Responses that rarely change are regenerated and re-sent on every request: no cache headers, no CDN, no application cache.
GreenCode researchers list missing caches as an energy waste to fix.
GreenCode helps tackle this by scoring a codebase against quality, security and green software patterns in one pass, so a missing cache comes out as a ranked defect alongside the bugs and security findings. More on this.
Why send the same bytes a million times? Many responses rarely change. Yet they are rebuilt and sent again on every request. No cache headers, no content delivery network, no cache in the app. Every request not made is energy not spent. On your servers, on the network, and on the user's device. Here is the fix you can use today. First, set cache headers on static files, with long lifetimes. Put a version in each file name, so a change gets a new address. Next, serve static content from a content delivery network. Then cache costly query results in your app, where slightly old data is fine. GreenCode's Constitution skill can help an AI coding agent spot missing caches. And tools like WebPageTest show every request a page makes, and its size. GreenCode researchers list missing caches as an energy waste to fix. GreenCode helps tackle this by scoring code against green software patterns in one pass. A missing cache comes out ranked, alongside bugs and security findings. That was GreenCode Tech Tip number forty-seven. Follow for the next tip, and find more on greencode.ai/tech-tips.
Share this