Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Update README.md
  • Loading branch information
stefanjudis authored Apr 23, 2023
commit 93a9fde00a3df6ae3caedda8751b4e28c2231e58
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ A curated list of snippets to get Web Performance metrics to use in the browser
- [Resources hints](#resources-hints)
- [Find Above The Fold Lazy Loaded Images](#find-above-the-fold-lazy-loaded-images)
- [Find non Lazy Loaded Images outside of the viewport](#find-non-lazy-loaded-images-outside-of-the-viewport)
- [Find render-blocking resources](#find-render-blocking-resources)
- [Image Info](#image-info)
- [Fonts Preloaded, Loaded, and Used Above The Fold](#fonts-preloaded-loaded-and-used-above-the-fold)
- [First And Third Party Script Info](#first-and-third-party-script-info)
Expand Down Expand Up @@ -255,6 +256,20 @@ console.log(
);
```

### Find render-blocking resources

List all resources that are blocking rendering.

```js
function findRenderBlockingResources() {
return window.performance.getEntriesByType('resource')
.filter(({renderBlockingStatus}) =>
renderBlockingStatus === 'blocking');
}

console.log(findRenderBlockingResources());
```

### Image Info

List all image resources and sort by (`name, transferSize, encodedBodySize, decodedBodySize, initiatorType`)
Expand Down