This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:18.04 | |
LABEL author="[email protected]" | |
# Default versions for Chrome Stable and Lighthouse | |
# | |
# Can be overidden at build time e.g. docker build --build-arg LIGHTHOUSE_VERSION=8.5.1 | |
# | |
# Stable Chrome versions https://www.ubuntuupdates.org/package/google_chrome/stable/main/base/google-chrome-stable | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 1. Open Chrome's console | |
// 2. Activate the option "Preserve log" | |
// 3. Copy-paste this script | |
// 4. Interact with the page (clicks, keyhits...) | |
// 5. Refresh the page or switch tab twice, the console will then log the INP culprits > 40ms. | |
var s=document.createElement('script');s.src='//unpkg.com/web-vitals@next/dist/web-vitals.iife.js';s.onload=()=>{webVitals.onINP(console.log)};document.head.appendChild(s) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Simply copy and paste in the browser's console */ | |
function weightToNumber(str) { | |
if (str === 'normal') { | |
return 400; | |
} | |
if (str === 'bold') { | |
return 700; | |
} | |
return parseInt(str, 10); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Copy this function in the browser console then start using. | |
* | |
* Example: | |
* | |
* findMultipleCssProperties([['font-family', 'Roboto'], ['font-weight', 'normal', true], ['font-style', 'italic', true]]) | |
* --> the last parameter (true) means the value should be found exactly, otherwise any string that contains the value is marked as ok | |
* | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (window.addEventListener) { | |
window.addEventListener("load", AIALoadEvent); | |
} else { | |
window.attachEvent("onload", AIALoadEvent); | |
} | |
function AIALoadEvent() { | |
if (self == top) { | |
setTimeout(AIADisplayADV, 2000); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This list was moved to https://letstalkaboutwebperf.com/en/gzip-brotli-server-config/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Copy this function in the browser console then start using. | |
* | |
* Examples: | |
* | |
* findCssProperty('background-image') | |
* --> log into the console all the background-images used | |
* | |
* findCssProperty('font-family', 'Roboto') | |
* --> log into the console all elements that have a background that contains the string "Roboto" |