Browser extension that allows the user to browse the web more sustainably
Sustainable Web Browsing Extension
The internet has become a big part of modern life and its use is still steadily rising in numbers. This increase in use costs energy for the servers that these web pages and other essential components are running on, as well as for the end user’s computer. There are multiple ways in which web pages would consume more energy than necessary. Firstly, web pages are inefficiently built, as developers typically do not prioritise efficient energy consumption. Secondly, Web pages often show a lot of unnecessary elements, like images, that a visitor is not interested in. The benefits of making a web page more energy efficient are not as apparent for developers. When web efficiency is focussed on, it's typically for other reasons than energy consumption, like page loading speed and accessibility for people with low bitrate.
Because of this lack of focus, a lot of energy can be saved by making the web more efficient. Specifically, we will be looking at bringing efficiency to the server-side. While the most efficient way to do this is to adapt the web pages directly, it can also be done externally. We aim to do this by building a browser extension that filters web pages before they are loaded in. This extension can be added to your browser and automatically adds the filter onto any web page that you are visiting.
By work of the extension, pages get stripped of unnecessary features, like borders, shadows, animations & transitions, backgrounds and other decorations. Fonts are defaulted to Arial, which is built in any browser. A grey scale is overlaid onto the site and images are swapped for an empty frame.
To implement such a browser extension, we primarily made use of CSS insertion. This can be performed before a page loads, which makes it perfect for our aim to reduce page load emissions without altering any functionality of the page. This method is also not page-specific, so the extension can be active on any and all web pages.
Inserting CSS allows us to overwrite a lot of style scripting in the page and also allows removing images in a lot of instances. Furthermore, we use it to remove transitions and simplify all elements on the page; pages are grayscale, fonts are defaulted to Arial, text decorations and shadows are removed, colours are also set to a default. All these things make the page a more simplified version of itself.
After the CSS-insertion has taken place, the page is loaded. Only then we can run javascript on the DOM (Document Object Model), which is the model that describes the page’s content. Here all image and other media elements, such as video and audio, are removed from the page.
Read more
Because of this lack of focus, a lot of energy can be saved by making the web more efficient. Specifically, we will be looking at bringing efficiency to the server-side. While the most efficient way to do this is to adapt the web pages directly, it can also be done externally. We aim to do this by building a browser extension that filters web pages before they are loaded in. This extension can be added to your browser and automatically adds the filter onto any web page that you are visiting.
By work of the extension, pages get stripped of unnecessary features, like borders, shadows, animations & transitions, backgrounds and other decorations. Fonts are defaulted to Arial, which is built in any browser. A grey scale is overlaid onto the site and images are swapped for an empty frame.
To implement such a browser extension, we primarily made use of CSS insertion. This can be performed before a page loads, which makes it perfect for our aim to reduce page load emissions without altering any functionality of the page. This method is also not page-specific, so the extension can be active on any and all web pages.
Inserting CSS allows us to overwrite a lot of style scripting in the page and also allows removing images in a lot of instances. Furthermore, we use it to remove transitions and simplify all elements on the page; pages are grayscale, fonts are defaulted to Arial, text decorations and shadows are removed, colours are also set to a default. All these things make the page a more simplified version of itself.
After the CSS-insertion has taken place, the page is loaded. Only then we can run javascript on the DOM (Document Object Model), which is the model that describes the page’s content. Here all image and other media elements, such as video and audio, are removed from the page.
Source Manifest.json
{"update_url": "https://clients2.google.com/service/update2/crx", "manifest_version": 3, "name": "Sustainable Web Browsing", "description": "Browser extension that allows the user to browse the web more sustainably", "author": "Robert Arntzenius, Koen Hagen & Floor Straver", "version": "0.1", "content_scripts": [ { "matches": [ "", "http://*/*", "https://*/*" ], "js": [ "content.js" ], "css" : ["styles.css"], "run_at": "document_start" } ], "action": { "default_title": "Sustainable Software Engineering", "default_icon": "icon16.png" }, "icons": { "16": "icon16.png" }}
Read more