Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with the 2022 sustainability chapter - Clarification on Recommended Page Weight Threshold #3710

Open
LarsFlieger opened this issue Jul 26, 2024 · 8 comments
Assignees

Comments

@LarsFlieger
Copy link

In page weight, you write:

Page weight represents the amount of data transferred to access the web page (based only on HTTP requests). As explained before, it is here used as a proxy to calculate Greenhouse Gas Emissions.

It is recommended to keep this metric as low as possible. 1 MB should be a maximum when you get started but 500 kB should be your ultimate threshold.

How did you arrive at the conclusion that 1 MB should be the maximum? Is there any calculation or data supporting this recommendation?

@rviscomi
Copy link
Member

Tagging the coauthors

@timfrick
Copy link

I didn't write this specific section of the chapter, but it seems to me that the recommendation may have been pulled from the calculator embedded in the post you linked to. The post also links to Core Web Vitals data, which has clear recommended benchmarks as well.

Regardless, in our day-to-day agency work, these aren't hard and fast rules. While we may target a 500 kb performance budget at the beginning of a project, the end result might be slightly higher or lower based on decisions we make together with our team and clients. If we got hung up on the numbers, we'd never finish a project or the product wouldn't end up meeting desired goals, which are an important measure of success.

To that end, we weigh performance budget against page purpose, business goals, user needs, client intent, estimated emissions, and other factors to make project and page recommendations. Our goal is always to make the most sustainable recs, but this is often different for every client based on these varying factors.

With that being said, this approach does help us help our clients understand the potential ramifications of a 250 kb page vs. a 1 MB page vs. a 2.4 MB page, etc. In our experience, unless team training and maintenance are also included with these engagements, it's not long before a 500 kb page becomes a 3 MB page. Then all your good work is for naught and the performance budget numbers don't matter.

Related, we used HTTP Archive data when devising digital carbon ratings, the threshold for which is based on total transfer size. The median for this on mobile is 2.4 MB (a digital carbon rating of 'F'). The threshold for an 'A' rating is 531.15 kb, so a 500 kb page would get you an 'A+'. However, this isn't reflected in the 2022 chapter, FWIW. I'm just sharing to show how thinking has evolved—and continues to evolve—on this topic.

@ldevernay or @gerrymcgovernireland may have different opinions or thoughts to add here.

@LarsFlieger
Copy link
Author

@timfrick Thanks for your reply.

I appreciate your insights and agree with your point. However, I'm still unclear on how the 1 MB goal is defined.

  • If the calculator was used to determine this goal, what parameters were considered and why?
  • While Core Web Vitals have timing data limits, they don't specify page weight limits.

For the upcoming study, it might be beneficial to include explanations for how limits or recommendations are calculated.

@gerrymcgovernireland
Copy link

gerrymcgovernireland commented Jul 29, 2024 via email

@timfrick
Copy link

@LarsFlieger, the fact that we're struggling to create consensus on the content of a linked source underscores how important it is that chapter recommendations be clear and easy to understand. Thanks again for highlighting this issue. @ldevernay, if I can help review the new chapter with an eye on this specific issue, please let me know.

@4upz or @fershad, in analyzing the 2022 chapter, do you happen to recall how this linked post translated to a 500 kb to 1 MB page weight threshold recommendation?

@LarsFlieger
Copy link
Author

@timfrick I totally agree.

The 500 KB comes from this section: https://infrequently.org/2021/03/the-performance-inequality-gap/#:~:text=For%20%22modern%22%20pages%2C%20half%20a%20megabyte%20is%20a%20decent%20hard%20budget.

For "modern" pages, half a megabyte is a decent hard budget.

Only the 1 MB I can't find.

@gerrymcgovernireland
Copy link

gerrymcgovernireland commented Jul 31, 2024 via email

@ldevernay
Copy link
Contributor

Hi all,
Thanks @timfrick for your answers. Your review is always welcome.
@LarsFlieger : the main elements were mentioned above : some articles point at a 500 kB threshold (https://infrequently.org/2021/03/the-performance-inequality-gap/) but, for many websites, this might prove tough. 1 MB is usually a good compromise : easy to remember and usually easy to reach by applying some basic efficiency best practices.
In my opinion, you can't have data to support this :

  • Averages for existing web pages are way too high
  • It depends on lots of factors (type of page, type of website, etc)

Each sustainability threshold should be adjusted for each website (and evolve in time) to make sure it keeps the team motivated. But, usually, 1 MB could be a good starting point (especially for teams who have never heard of sustainability before). 500 kB and under should be the final purpose. But that shouldn't prevent you from starting higher on really heavy websites when you don't want the team to be frustrated.

Measuring websites for sustainability is still challenging : transferred data, DOM size and number of HTTP requests are far from enough. Simply loading a page is not enough either. However we can get started with simple metrics (measurable through browsers) and simple thresholds to get started. With continuous improvement in mind, things will be ok.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants