sitespeedio/sitespeed.io

Add "SiteSpeed" identifier to User-Agent header in CO2.js

Closed this issue · 3 comments

Feature/improvement

CO2.js v0.14.2 adds a User-Agent string header to green hosting checks that are performed.

By default this header sends the current version of CO2.js being used. There is an option of developers to add the name of their app/project to the User-Agent string to give the Green Web Foundation some more visibility of who's using our open source tools.

Docs: https://developers.thegreenwebfoundation.org/co2js/tutorials/check-hosting/#check-one-domain-for-green-hosting

Happy to create a small PR for this.

Hi @fershad I pushed a PR for it. One thing though, by default sitespeed.io runs with a local database (privacy reasons) so the user need to actively choose to use the online API.

Cheers @soulgalore, thanks for this. Noted about the implementation of the local database solution.

This has been released.