You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
2. Run it in a new [DevTools snippet](https://developer.chrome.com/docs/devtools/javascript/snippets/), or use a [bookmarklet](https://caiorss.github.io/bookmarklet-maker/) generator
18
+
1. Install the [Chrome extension](https://chrome.google.com/webstore/detail/capo/ohkeehjepccojmgephomofandmjaafid)
For applications that add lots of dynamic content to the `<head>` on the client, it'd be more accurate to look at the server-rendered `<head>` instead.
You can use the [`capo` WebPageTest custom metric](webpagetest/) to evaluate only the server-rendered HTML `<head>`. Note that because this approach doesn't output to the console, we lose the visualization.
81
+
### API Reference
35
82
36
-
### BigQuery
83
+
#### Core Functions
84
+
85
+
-`analyzeHead(head, adapter)` - Analyzes a head element and returns detailed results
86
+
-`analyzeHeadWithOrdering(head, adapter)` - Analyzes with ordering violations
87
+
-`checkOrdering(elements)` - Checks for ordering violations in element array
88
+
-`getWeightCategory(weight)` - Gets the category name for a weight value
89
+
90
+
#### Rules API
91
+
92
+
-`ElementWeights` - Constant object mapping element types to weight values
93
+
-`getWeight(element, adapter)` - Gets the weight for a specific element
94
+
-`getHeadWeights(head, adapter)` - Gets weights for all elements in head
95
+
96
+
Plus individual detector functions: `isMeta()`, `isTitle()`, `isPreconnect()`, etc.
97
+
98
+
#### Validation API
99
+
100
+
-`VALID_HEAD_ELEMENTS` - Array of valid head element names
101
+
-`isValidElement(element, adapter)` - Checks if an element is valid in head
102
+
-`hasValidationWarning(element, adapter)` - Checks if element has warnings
103
+
-`getValidationWarnings(head, adapter)` - Gets all validation warnings
You can also use the [`httparchive.fn.CAPO`](bigquery/) function on BigQuery to process HTML response bodies in the HTTP Archive dataset. Similar to the WebPageTest approach, the output is very basic.
0 commit comments