Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What percentage of CSS is served minified? #25

Closed
LeaVerou opened this issue Jul 17, 2020 · 2 comments
Closed

What percentage of CSS is served minified? #25

LeaVerou opened this issue Jul 17, 2020 · 2 comments
Labels
proposed stat Proposed statistic to study Rejected stat This stat cannot be included in the chapter

Comments

@LeaVerou
Copy link
Owner

LeaVerou commented Jul 17, 2020

…and what percentage of that uses sourcemaps?

@LeaVerou LeaVerou added the proposed stat Proposed statistic to study label Jul 17, 2020
@LeaVerou LeaVerou added ⚠️ Needs SQL Needs SQL to calculate this stat ⚠️ Needs algorithm ⚠️ Needs JS Needs JS to calculate this stat labels Aug 4, 2020
@LeaVerou
Copy link
Owner Author

LeaVerou commented Aug 5, 2020

Damn, this would have been very easy to measure with the custom metrics code for #39. Anyhow, now we will need to match the HTML for .min.css in <link rel=stylesheet”>. Not sure how HTML querying works, does it need to be in the raw body or is there a parsed DOM stored similar to our Rework AST for CSS? @rviscomi ?

An alternative plan would be to match the CSS itself for patterns that are common in minified files, eg no comments, no spacing between tokens that can avoid it, all declarations on the same line etc. That’s probably more accurate but more involved to code.

@LeaVerou LeaVerou added ✅ Has algorithm (1/3) An implementable algorithm for how to measure this stat has been described in the issue and removed ⚠️ Needs algorithm labels Aug 5, 2020
@rviscomi
Copy link
Collaborator

rviscomi commented Aug 6, 2020

Since this metric missed the custom metric window would you be open to cutting it from the chapter? Querying the response bodies is prohibitively expensive and the remaining heuristics may not be strong enough to answer this question confidently.

@LeaVerou LeaVerou added Rejected stat This stat cannot be included in the chapter and removed Section: Usage ⚠️ Needs JS Needs JS to calculate this stat ⚠️ Needs SQL Needs SQL to calculate this stat ✅ Has algorithm (1/3) An implementable algorithm for how to measure this stat has been described in the issue labels Aug 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
proposed stat Proposed statistic to study Rejected stat This stat cannot be included in the chapter
Projects
None yet
Development

No branches or pull requests

2 participants