You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: explainers/Sustainability/explainer.md
+50-25Lines changed: 50 additions & 25 deletions
Original file line number
Diff line number
Diff line change
@@ -1,49 +1,73 @@
1
-
# DevTools: Feature for Sustainable Web Development
1
+
2
+
# DevTools: Sustainable Web Development Feature
3
+
2
4
Author:
3
-
-[Taylore Givens](https://github.com/tayloregivens), Program Manager
5
+
-[Taylore Givens](https://github.com/tayloregivens), Program Manager
6
+
4
7
## Status of this feature
5
-
This is a proposal for a new feature not yet in development. The team welcomes your feedback on this feature. Please [comment on this thread](https://github.com/MicrosoftEdge/DevTools/issues/92) to share your thoughts.
8
+
9
+
Proposal for a feature not yet in development. Please share your feedback [here](https://github.com/MicrosoftEdge/DevTools/issues/92).
10
+
6
11
## Definition
7
-
sustainability of a web app – energy consumption of a web app
12
+
13
+
web app sustainability – energy consumption and type of energy (i.e. fossil fuels/renewable) used for a web app
14
+
8
15
## Introduction
9
-
The carbon impact of the internet, including the hardware, software, and systems that go into creating it, produces about [3.7%]( https://www.bbc.com/future/article/20200305-why-your-internet-habits-are-not-as-clean-as-you-think) of global carbon emissions. This is similar to the percentage of global emissions from the [airline industry](https://www.bbc.com/future/article/20200305-why-your-internet-habits-are-not-as-clean-as-you-think). Developers and the public are becoming increasingly more aware and concerned about this issue. A growing number of *developers are interested in understanding what factors impact a web app's sustainability or energy consumption* and how to reduce the energy consumption. Consequently, tools such as [Website Carbon](https://www.websitecarbon.com/), [Ecograder](https://ecograder.com/), [EcoPing](https://ecoping.earth/blog/core-web-vitals-and-sustainability), and [Beacon](https://digitalbeacon.co/) have been created to calculate the amount of CO2 a web app emits and provide recommendations to improve the sustainability of a web app.
16
+
17
+
The carbon impact of the internet, including the hardware, software, and systems that go into creating it, produces about [3.7%]( https://www.bbc.com/future/article/20200305-why-your-internet-habits-are-not-as-clean-as-you-think) of global carbon emissions. This is similar to the percentage of global emissions from the [airline industry](https://www.bbc.com/future/article/20200305-why-your-internet-habits-are-not-as-clean-as-you-think). Developers and the public are becoming increasingly more aware and concerned about this issue. Developers are increasingly interested in understanding **what factors impact a web app's sustainability and how to improve it's sustainability.** Consequently, tools such as [Website Carbon](https://www.websitecarbon.com/), [Ecograder](https://ecograder.com/), [EcoPing](https://ecoping.earth/blog/core-web-vitals-and-sustainability), and [Beacon](https://digitalbeacon.co/) have been created to calculate the amount of CO2 a web app emits and provide recommendations to improve the sustainability of a web app.
18
+
10
19
## Goals
11
-
Adding sustainability features to Edge DevTools will raise awareness about the alarming carbon impact of web apps and the internet and help developers measure and improve the sustainability of their web apps by
20
+
21
+
Adding sustainability features to DevTools will raise awareness about the alarming carbon impact of web apps and the internet and help developers measure and improve the sustainability of their web apps by
12
22
- Providing proxy web app sustainability measurements
13
23
- Highlighting common factors that reduce the sustainability of web apps by showing or explaining how these factors decrease performance and increase energy consumption
14
24
- Indicating to developers what actions they’re currently taking, such as performance improvements, that also improve web app sustainability
15
25
- Educating developers on new actions they can take that are purely beneficial for sustainability.
26
+
16
27
## Solution
17
-
Summary of features we’re investigating adding to DevTools:
18
-
- Label existing issues in the Issues panel that are beneficial to sustainability and energy efficiency
19
-
- Create a “Sustainability” tab that provides metrics on the overall energy consumption of the web app, the impact third parties have on energy and performance, and a list of best practices to improve sustainability
28
+
29
+
### Summary
30
+
31
+
- Label existing issues in the Issues panel that are beneficial to sustainability and energy efficiency
32
+
- Create a “Sustainability” tab that is a hub for sustainability-related metrics and provides insights about web app energy consumption, the type of energy used to power a web app, third parties' impact on performance and energy, and best practices to improve sustainability.
20
33
21
34
### Sustainability Content Labeling in Issues Tab
35
+
22
36

23
37
Mockup is conceptual, not the final design
38
+
24
39
#### Usage
25
-
Once the user navigates to the Issues panel, any issue or category relevant to improving sustainability will have a sustainability label. Clicking this label will expand the category or issue dropdown window. The dropdown window will include a green banner describing how the category or issue is related to sustainability. The banner will also include a link to external documentation to learn more about why the category or issue is sustainability related. The banner will potentially also include a link to the DevTools Sustainability Tab (see next section) which has a dashboard of sustainability-related metrics and insights.
26
-
Sustainability labeling will be enabled by default but can be disabled to reduce noisiness. Categories or issues labeled as sustainable would be prioritized in the ordering of categories and issues.
40
+
41
+
Once the user navigates to the Issues panel, any issue or category relevant to improving sustainability will have a sustainability label. Clicking this label will expand the category or issue dropdown window. The dropdown window will include a green banner describing how the category or issue is related to sustainability. The banner will also include a link to external documentation to learn more about why the category or issue is sustainability related. The banner will potentially also include a link to the DevTools Sustainability Tab (see next section).
42
+
43
+
Sustainability labeling will be enabled by default but can be disabled with the checkbox to reduce noisiness. Categories or issues labeled as sustainable would be prioritized in the ordering of categories and issues.
27
44
28
45
### Sustainability Tab
29
-
The Sustainability tab will be a hub for sustainability-related metrics and provide insight about web app energy consumption, third parties' impact on performance, and best practices to improve sustainability.
30
46
31
-
Some developers have suggested adding a website carbon calculator to DevTools, similar to the calculator on [Website Carbon](https://www.websitecarbon.com/). However, since these algorithms rely on inputting the byte size of the website and applying average ratios (i.e. kWh/byte and CO2 g/kWh) to get a carbon estimate, this methodology leaves many factors unaccounted for. Therefore, we propose displaying the carbon calculation as an estimate of carbon emitted from the *network transfer energy that goes into rendering a web app* rather than having the calculation represent the total carbon emissions associated with a web app.
47
+
This tab will be a hub for sustainability-related metrics and provide insights about web app energy consumption, the type of energy used to power a web app, third parties' impact on performance and energy, and best practices to improve sustainability.
32
48
33
-
#### Content and Usage
34
-
The Sustainability tab will have three sections: Energy Consumption, Third Party Impact, and Best Practices.
49
+
Although developers requested a web app carbon calculator feature in DevTools, like [Website Carbon](https://www.websitecarbon.com/), these types of algorithms are underdeveloped and inaccurate because they often rely on inputting the byte size of a website and applying average ratios (i.e. kWh/byte and CO2 g/kWh) to get a carbon estimate. This type of algorithm is **better suited to estimate the carbon emitted from the energy used to transfer a web app over the network** rather than estimate the total carbon emissions associated with a web app.
35
50
36
-
Energy Consumption
51
+
#### Content and Usage
37
52
38
-
> The Client-Device Energy and Network Transfer Energy sub-sections display metrics relevant to how much energy is used to render the web app on the client device and transfer it over the network to give the developer a sense of the energy consumed by the web app.
39
-
> Client-device energy
40
-
> - “Client-Device Energy Score“ is out of 100 and is based on the CPU utilization and GPU utilization of the web app's initialization compared to the average web app. The score will vary slightly depending on the client's device due to different hardware. The score should be used as a guideline metric to assess how incremental code changes affect the client device energy.
41
-
> - CPU metrics such as the average CPU utilization and the live CPU utilization
42
-
> - Link to Performance tab to further investigate CPU utilization
43
-
> Network Transfer energy
44
-
> - Bytes transferred and number of network requests to give context to the amount of network activity the web app is generating
45
-
> - Use an open-source API, such as the [Green Web Foundation API] (https://www.thegreenwebfoundation.org/green-web-feed/), to estimate carbon emissions due to the energy required to transfer bytes over the network
53
+
The Sustainability tab has three sections: Sustainability Analysis, Third Party Impact, and Best Practices.
46
54
55
+
Sustainability Analysis
56
+
> Energy Consumption
57
+
> > The Client-Device Energy and Network Transfer Energy sub-sections display proxy metrics relevant to how much energy is used to render the web app on the client device and transfer it over the network to give the developer a sense of the energy consumed by the web app.
58
+
> >
59
+
> >Client-Device Energy
60
+
> >- “Client-Device Energy Score“ is out of 100 and is based on the CPU utilization and GPU utilization of the web app's initialization compared to the average web app. The score will vary slightly depending on the client's device due to different hardware. The score should be used as a guideline metric to assess how incremental code changes affect the client device energy.
61
+
> >- CPU metrics such as the average CPU utilization and the live CPU utilization
62
+
> >- Link to Performance tab to further investigate CPU utilization
63
+
> >
64
+
> >Network Transfer Energy
65
+
> >- Bytes transferred and number of network requests to give context to the amount of network activity the web app is generating
66
+
> >- Use an open-source API, such as the [Green Web Foundation API](https://github.com/thegreenwebfoundation/co2.js), to get a carbon estimate and display this value as the emissions from the energy required to transfer the web app bytes over the network.
67
+
> >
68
+
> Energy Type
69
+
> > Display whether the web app runs on a green hosting service (i.e. service that runs on renewable energy) based on the Green Web Foundation's open source [dataset](https://www.thegreenwebfoundation.org/green-web-datasets/).
70
+
> >
47
71
Third-Party Impact
48
72
> Third parties are often incorporated or added on top of web apps without much thought as to how they affect the weight and performance of the app. We will display the following data to help developers identify the potential negative impact third parties are having on their web app.
49
73
> - number of requests made to third parties
@@ -52,7 +76,8 @@ Third-Party Impact
52
76
53
77
Best Practices
54
78
> Sustainable web app design recommendations focus on making the web app as light and high-performant as possible by limiting unnecessary web app components.
55
-
> There are certain properties we recommend eliminating or adding to a web app to improve its sustainability, such as eliminating [inline CSS Styles](https://webhint.io/docs/user-guide/hints/hint-no-inline-styles/) because inline CSS can’t be cached or switching your hosting to a [hosting service that runs on renewable energy](https://www.thegreenwebfoundation.org/).
79
+
>
80
+
> There are certain properties we recommend eliminating or adding to a web app to improve its sustainability, such as eliminating [inline CSS Styles](https://webhint.io/docs/user-guide/hints/hint-no-inline-styles/) because inline CSS can’t be cached or [minifying all your CSS and Javascript](https://webhint.io/docs/user-guide/hints/hint-minified-js/).
56
81
>
57
82
> However, for other properties that negatively impact sustainability, it's unreasonable to recommend that all web apps eliminate these properties such as [custom fonts or large photos](https://www.fastcompany.com/90605005/these-are-the-worlds-most-sustainable-fonts#:~:text=Arial%20and%20Times%20New%20Roman%20aren%E2%80%99t%20the%20only,custom-designed%20typefaces%2C%20this%20is%20slim%20pickings.%20%5BScreenshot%3A%20FormaFantasma%5D). Therefore, we will provide a table that shows the number of custom fonts, large photos, and other properties in a color-coded manner to indicate which counts are above or below average to give developers a sense of how sustainable their website is compared to other sites.
0 commit comments