A page view shouldn't need a database.
Content sites often run an application server and a database for every page view, even though the pages change rarely.
GreenCode moved its own website from WordPress to static pages served from the edge.
GreenCode helps tackle this by proving it on greencode.ai first: static pages on an edge network, WebP images and scripts only where used. A first view of the home page fell from 6,766 KB over 80 requests to 1,719 KB over 33. More on this.
A page view should not need a database. Many content sites build every page fresh, for every visitor. An app server runs code, and a database answers queries. Yet the pages themselves change only now and then. That is work repeated on every single view. Here is the fix you can use today. Build pages that rarely change as plain static files. Serve them from a content delivery network, close to your visitors. Give them long cache lifetimes. Keep server code only for parts that really change, like forms. GreenCode moved its own website from WordPress to static pages served from the edge. Check the result using tools like Greencheck, CO2.js and WebPageTest. They check for green hosting, estimate carbon from bytes, and show every request. GreenCode helps tackle this by proving it on its own site first. Its home page fell from six point eight megabytes to one point seven. That was GreenCode Tech Tip number seventeen. Follow for the next tip, and find more on greencode.ai/tech-tips.
Share this