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

Taking browser/server cache into account #12

Open
fm89 opened this issue Aug 3, 2019 · 2 comments
Open

Taking browser/server cache into account #12

fm89 opened this issue Aug 3, 2019 · 2 comments

Comments

@fm89
Copy link

fm89 commented Aug 3, 2019

Thanks for this project. I was looking for such a tool. However, it looks like Carbonalyser does not properly take caching into account.

Concerning my Internet browsing, this results in wrong orders of magnitude for the importance of different websites. Indeed, when browsing on, say GitHub all day long, CSS, JS or image assets are loaded only once (and not 100 or 1000 times per day).

There are (at least) two situations that need to be handled correctly:

  1. The browser does not send the query to the server, but loads the resource from it's own cache. This should not count in "data center" and "data transfer" kWh or CO2 costs.
  2. The brower sends a request but the server returns an HTTP 304 (resource not modified) status code. Then there is a request but only of very small size. The full size of the resource should not count in "data center" and "data transfer" kWh or CO2 costs since it is loaded from cache and only a very small query was made.
@supertanuki
Copy link
Collaborator

Thanks @fm89 I will take a look. If you are a js developer, feel free to contribute to the code !

@AAABBBCCCAAAA
Copy link

AAABBBCCCAAAA commented Jan 19, 2022

we are 2021 things are a little bit more complicated because we got RCWN feature in browsers https://superuser.com/questions/1630514/how-to-disable-race-cache-with-network-rcwn-in-firefox.

So even if the request even if the request have been served from cache we may consider that the data have been sent over wire.

It thing we should close this issue as it is not technically feasible at the time and reopen it later if the feature RCWN disapear

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

Successfully merging a pull request may close this issue.

3 participants