Skip to content
Source code for Web Bloat Score Calculator: https://www.webbloatscore.com/
JavaScript C# HTML Batchfile CSS
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
HtmlMinifier
WebBloatScore
.gitignore
LICENSE
README.md Grammar fixes Jan 20, 2020
WebBloatScore.sln

README.md

WebBS-Calculator

Live demo of Web Bloat Score Calculator: https://www.webbloatscore.com/

How to run the project

WebBS-Calculator uses the SlimmerJS scriptable browser that requires Firefox version 48 or older to be installed on your computer. You can download it from Mozzila's archive.

If you don’t choose the default install location (C:\Program Files\Mozilla Firefox 48\firefox.exe), you need to let SlimmerJS know by modifying the WebBloatScore/Slimerjs/slimmer.bat file on lines 202 and 203 with the path you chose during the installation.

After that you can simply run the WebBloatScore ASP.NET MVC application.

Calculation

As described on https://www.webbloatscore.com/, the web bloat score is calculated as WebBS = TotalPageSize / PageImageSize

In the project the calculation is happening in the SlimmerExecutor class:

  1. First SlimmerJS is executed. It creates and stores a screenshot of the web page and returns the total size of the page.
  2. After that PngQuant library is used to optimize the screenshot of the page.
  3. In the end the result with all values necessary to calculate WebBS is returned.

Performance

The tasks necessary to calculate the score are time-consuming and depending on the hardware can take several minutes to complete. Therefore the timeout is used to limit the execution time. On top of that caching of the most used websites is used to save resources.

You can’t perform that action at this time.