cnumr / GreenIT-Analysis

GreenIT-Analysis
GNU Affero General Public License v3.0
148 stars 31 forks source link

Remove data urls from network requests count #11

Closed teksaver closed 5 years ago

teksaver commented 5 years ago

Images embedded in HTML or CSS as data urls (https://developer.mozilla.org/fr/docs/Web/HTTP/Basics_of_HTTP/Data_URIs) are currently counted as network requests.

This means pages using them have more network requests counted against them, and the payload is counted twice (once inside the HTML where it is embedded, and once when the request is accounted for in the har)

This patch filters data urls from the har results.