Skip to content

Commit 9b2444e

Browse files
authored
Exclude non_blocking_dynamic from the render blocking section (#4826)
Chrome tags dynamically injected resources that don't block rendering as non_blocking_dynamic — a more specific flavour of non_blocking, not a problem. They showed up in the render blocking card's "Other" section, implying something to investigate where there is nothing. All spellings of the value now join non_blocking in the excluded set; genuinely unknown statuses still surface in Other so nothing is hidden. Co-authored-by: Claude Fable 5 noreply@anthropic.com
1 parent 3b40d0b commit 9b2444e

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

lib/plugins/html/templates/url/pagexray/blocking.pug

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,14 @@ if pagexray.renderBlocking
33
//- Chrome ships the status in two spelling families (potentially_blocking
44
//- AND potentiallyblocking can appear in the same HAR, depending on which
55
//- Chrome source browsertime got the value from) — normalize before
6-
//- matching. non_blocking assets are explicitly not render blocking and
7-
//- are excluded (the old table listed them, and pagexray's page counters
6+
//- matching. non_blocking and non_blocking_dynamic (a dynamically
7+
//- injected resource that doesn't block — Chrome's more specific
8+
//- flavour of non_blocking) are explicitly not render blocking and are
9+
//- excluded (the old table listed them, and pagexray's page counters
810
//- even count them as blocking).
911
- const rbNorm = v => String(v).split('_').join('').toLowerCase()
10-
- const renderBlockingAssets = pagexray.assets.filter(a => a.renderBlocking && rbNorm(a.renderBlocking) !== 'nonblocking')
12+
- const RB_NOT_BLOCKING = ['nonblocking', 'nonblockingdynamic', 'dynamicallyinjectednonblocking']
13+
- const renderBlockingAssets = pagexray.assets.filter(a => a.renderBlocking && !RB_NOT_BLOCKING.includes(rbNorm(a.renderBlocking)))
1114
//- Chrome's renderBlocking enum, one section per status. Friendly
1215
//- names and a one-line explanation per section because the raw
1316
//- values (in_body_parser_blocking) mean nothing to most readers.

0 commit comments

Comments
 (0)