HTTPArchive / almanac.httparchive.org

HTTP Archive's annual "State of the Web" report made by the web community
https://almanac.httparchive.org
Apache License 2.0
610 stars 168 forks source link

Ability to force non-interactive data viz #520

Closed rviscomi closed 4 years ago

rviscomi commented 4 years ago

In some cases, like printing a paper copy or saving to PDF, it's better to have static images than interactive iframes. The images fit the screen better and don't require interactivity.

I'd like to add support for something like a ?print querystring parameter on chapter pages that forces all figures to use images. For now it must also disable lazy loading due to a bug in Chrome that doesn't load images below the fold when printing.

This is a small step towards a "PDF-friendly" version of the Almanac per #37.

tunetheweb commented 4 years ago

This should be fairly simple once https://github.com/HTTPArchive/almanac.httparchive.org/pull/511 is merged by either looking at the query string or detecting whether in print mode and then not upgrading to interactive visualisations in upgradeInteractiveFigures() function, and also removing the lazy-loading tags.