Simon Hearne - Principle Engineer @ Akamai
make something ๐ค
test it ๐
ship it ๐
...
put tags on it ๐ณ
we seem to have less control than ever
& there are increasingly more third-party providers
78.7%
of top 500k sites include JS
with known vulnerabilities
website tracking is a "security disaster waiting to happen"
<script src="//s7.addthis.com/addthis_widget.js" async></script>
How do you know when it changes?
discuss.newrelic.com/t/do-not-clear-the-resource-timing-buffer/
๐
๐
status.optimizely.com
orangevalley.nl/en/blog/9-ab-testing-tools-compared-on-site-speed-impact/
https://www.w3.org/TR/resource-timing-1/
nicj.net/resourcetiming-visibility-third-party-scripts-ads-and-page-weight/
Fast Fashionโฆ How Missguided revolutionised their approach to site performance
Fast Fashionโฆ How Missguided revolutionised their approach to site performance
Discovery | Impact | Reporting | Code Quality | Availability | Data Leakage | Performance | |
---|---|---|---|---|---|---|---|
Removal ๐ |
Identifying, Auditing, and Discussing Third Parties - CSS Wizardry
Akamai mPulse
Partner 1 = ~400ms slower than partner 2
Migrating all ads = ~100ms faster page load
Additional revenue ~= $8,000 per month
Large US publishing company
"Everything should have a value,
because everything has a cost"
Tim Kadlec
{
"csp-report": {
"document-uri": "https://yourwebsite.com/",
"referrer": "",
"violated-directive": "style-src",
"effective-directive": "style-src",
"original-policy": "",
"disposition": "enforce",
"blocked-uri": "inline",
"line-number": 4,
"column-number": 3,
"source-file": "https://static.hotjar.com/c/hotjar-730716.js?sv=6",
"status-code": 0,
"script-sample": ""
}
}
blog.catchpoint.com/2018/01/10/using-catchpoint-to-analyze-third-party-impact/
The
best way to monitor resources,
even with its limitations
Akamai mPulse
Discovery | Impact | Reporting | Code Quality | Availability | Data Leakage | Performance | |
---|---|---|---|---|---|---|---|
Removal | |||||||
Synthetic | |||||||
RUM | |||||||
CSP (RO) |
<link
rel="stylesheet"
href="//maxcdn.bootstrapcdn.com/.../bootstrap.min.css"
integrity="
sha256-8EtRe6XWoFEEhWiaPkLaw...=
sha512-/5KWJw2mvMO2ZM5fndVxU...=
"
crossorigin="anonymous">
<script
src="//ajax.googleapis.com/.../jquery.min.js"
integrity="
sha256-ivk71nXhz9nsyFDoYoGf2...=
sha512-7aMbXH03HUs6zO1R+pLye...=
"
crossorigin="anonymous"></script>
function timeout(delay) {
return new Promise(function(resolve, reject) {
setTimeout(function(){
resolve(new Response('', {
status: 408,
statusText: 'Request timed out.'
}));
}, delay);
});
}
self.addEventListener('fetch', function(event) {
// Only fetch JavaScript files for now
if (/\.js$/.test(event.request.url)) {
event.respondWith(Promise.race([timeout(2000), fetch(event.request.url)]));
} else {
event.respondWith(fetch(event.request));
}
});
calendar.perfplanet.com/2015/reducing-single-point-of-failure-using-service-workers/
Discovery | Impact | Reporting | Code Quality | Availability | Data Leakage | Performance | |
---|---|---|---|---|---|---|---|
Removal | |||||||
Synthetic | |||||||
RUM | |||||||
CSP (RO) | |||||||
SRI / Versioning | |||||||
CSP | |||||||
ServiceWorker | |||||||
Self Hosting |
๐ดโ @SimonHearne
๐ webperf.ninja/tools
๐ฅ shearne@akamai.com
@SimonHearne