SlideShare a Scribd company logo
State of the Resource Timing API
Aaron Peters
aaron@turbobytes.com
WebPerfDays Amsterdam, May 18 2013
What is the Resource Timing API?
API in the browser that exposes load time data for page
resources. "Navigation Timing API for for page objects"
How get timing data via the API?
window.performance.getEntriesByType("resource")[1] {
connectEnd: 298.0000000097789
connectStart: 298.0000000097789
domainLookupEnd: 298.0000000097789
domainLookupStart: 298.0000000097789
duration: 682.9999999608845
entryType: "resource"
fetchStart: 298.0000000097789
initiatorType: "css"
name: "http://st.cdnplanet.com/static/fonts/amaranth-bold-webfont.woff"
redirectEnd: 0
redirectStart: 0
requestStart: 946.9999999962747
responseEnd: 980.9999999706633
responseStart: 962.9999999962747
secureConnectionStart: 0
startTime: 298.0000000097789
}
Is the API ready for use?
Spec is not final yet. W3C Candidate Recommendation
API currently implemented in a few browsers:
● IE10
● Chrome, Chrome Mobile, Chrome Frame
Does it behave constistently & according to the spec?
12 things you should know
when using the API
When does the API make data
available for a resource?
While it's loading (OMG!)
Bug? Yes, but useful
"Did main.css finish
loading within 5 seconds?"
After the resource has
finished loading
This is according to spec
Timing-Allow-Origin: must be *
Spec states: T-A-O must be either origin-list-or-null
(RFC 6454) or *
In both browsers, only * works.
This does not work today:
● host: www.aaronpeters.nl
● scheme + host: http://www.aaronpeters.nl/
● scheme + host + port: http://www.aaronpeters.nl:
80/
Detect browser disk cache hits
Yes, you can!
if(
requestStart == fetchStart &&
requestStart == responseStart &&
responseStart != responseEnd
) { // disk cache hit }
Note: IE10 Dev Tools shows 304 when
actually is a disk cache hit.
Yes, you can!
if(
domainLookupStart != 0 &&
requestStart == 0
) { //disk cache hit }
Chrome says it's a bug, I
say it is a feature
Browser memory cache hits?
Not exposed by the API:
there is no data for the
resource
This is a bug
???
I have no idea how to test
for a memory cache hit in
IE10
Detect 4xx/5xx responses?
Not exposed by the API:
there is no data for the
resource
This is a bug
Data available via API
Looks same as cross-origin
200 response without
valid T-A-O header: all
timing attributes equal
zero, except startTime,
fetchStart, duration and
responseEnd
domainLookupStart = 0, huh?
Sometimes, in Chrome, domainLookupStart = 0,
even when a valid Timing-Allow-Header is present.
This is always impossible.
if(domainLookupStart < fetchStart){ // abort! }
DNS lookup & Connect times
unavailable in IE10
Values of the 4 relevant attributes are
always zero.
It's a bug.
IE10, y u no show SSL time?
sslTime = connectEnd -
secureConnectionStart
Chrome's behavior is in
line with Navigation
Timing API behavior, but
Resource Timing spec has
conflicting info. That will
be fixed.
Not exposed by the API
secureConnectionStart
attribute is not present !
Actually, the attribute is
optional according to the
spec
Track 'wait time'
How long is a resource in queue, waiting to be fetched?
If many resources have high waitTime, there is an
optimization opportunity (domain sharding?)
if(connectEnd == fetchStart){
waitTime = requestStart - connectEnd
} else {
waitTime = domainLookupStart - fetchStart
}
duration is useless
Same origin resource ||
valid T-A-O header
Has no added value.
What specific insight can
be gained from duration?
Cross-origin resource
No insight in split between
'wait time' and 'load time',
so how can duration
possibly be informative?
duration = responseEnd - startTime
Ignore all data in Chrome Frame
Data is exposed by the API, but it's bad data.
Objects fetched over network 'look' like browser disk
cache hits
if(!window.externalHost){ // not Chrome Frame }
Bytesize is not exposed :(
You can't know how many bytes were transferred.
A deliberate 'feature', for security reasons.
I strongly disagree. Knowing the bytesize is essential
for understanding resource load time.
Why not make it opt-in to expose bytesize?
Let the publisher be in control!
This discussion with the Working Group is not finished!
Some final remarks
Chrome currently uses a vendor prefix, eg.
webkitGetEntriesByType("resource")
When they switch to Blink, the prefix will be gone
Firefox will support the API soon(-ish), likely sans prefix.
Low activity on bug 822480
Safari & Opera will likely not have the API anytime soon:
they don't even support Navigation Timing API !
Future browser support
if one value doesn't make sense, discard all values
Be safe
Thank you !
Aaron Peters
aaron@turbobytes.com
WebPerfDays Amsterdam, May 18 2013
www.aaronpeters.nl/blog/state-of-resource-timing-api

More Related Content

What's hot

@media - Even Faster Web Sites
@media - Even Faster Web Sites@media - Even Faster Web Sites
@media - Even Faster Web Sites
Steve Souders
 
How fast are we going now?
How fast are we going now?How fast are we going now?
How fast are we going now?
Steve Souders
 
Browser Wars Episode 1: The Phantom Menace
Browser Wars Episode 1: The Phantom MenaceBrowser Wars Episode 1: The Phantom Menace
Browser Wars Episode 1: The Phantom Menace
Nicholas Zakas
 
Frontend SPOF
Frontend SPOFFrontend SPOF
Frontend SPOF
Patrick Meenan
 
do u webview?
do u webview?do u webview?
do u webview?
Steve Souders
 
Your Script Just Killed My Site
Your Script Just Killed My SiteYour Script Just Killed My Site
Your Script Just Killed My Site
Steve Souders
 
Web Directions South - Even Faster Web Sites
Web Directions South - Even Faster Web SitesWeb Directions South - Even Faster Web Sites
Web Directions South - Even Faster Web Sites
Steve Souders
 
High Performance JavaScript (CapitolJS 2011)
High Performance JavaScript (CapitolJS 2011)High Performance JavaScript (CapitolJS 2011)
High Performance JavaScript (CapitolJS 2011)
Nicholas Zakas
 
High Performance Snippets
High Performance SnippetsHigh Performance Snippets
High Performance Snippets
Steve Souders
 
Progressive Enhancement 2.0 (Conference Agnostic)
Progressive Enhancement 2.0 (Conference Agnostic)Progressive Enhancement 2.0 (Conference Agnostic)
Progressive Enhancement 2.0 (Conference Agnostic)
Nicholas Zakas
 
Metrics of Joy
Metrics of JoyMetrics of Joy
Metrics of Joy
Steve Souders
 
Cache is King
Cache is KingCache is King
Cache is King
Steve Souders
 
Oscon 20080724
Oscon 20080724Oscon 20080724
Oscon 20080724
linkedin_resptest2
 
Preconnect, prefetch, prerender...
Preconnect, prefetch, prerender...Preconnect, prefetch, prerender...
Preconnect, prefetch, prerender...
MilanAryal
 
Going Node At Netflix
Going Node At NetflixGoing Node At Netflix
Going Node At Netflix
Ryan Anklam
 
Fast Fashion… How Missguided revolutionised their approach to site performanc...
Fast Fashion… How Missguided revolutionised their approach to site performanc...Fast Fashion… How Missguided revolutionised their approach to site performanc...
Fast Fashion… How Missguided revolutionised their approach to site performanc...
Andy Davies
 
High Performance JavaScript (Amazon DevCon 2011)
High Performance JavaScript (Amazon DevCon 2011)High Performance JavaScript (Amazon DevCon 2011)
High Performance JavaScript (Amazon DevCon 2011)
Nicholas Zakas
 
Front End Development for Back End Developers - vJUG24 2017
Front End Development for Back End Developers - vJUG24 2017Front End Development for Back End Developers - vJUG24 2017
Front End Development for Back End Developers - vJUG24 2017
Matt Raible
 
Web20expo 20080425
Web20expo 20080425Web20expo 20080425
Web20expo 20080425
Media Gorod
 
Web Page Test - Beyond the Basics
Web Page Test - Beyond the BasicsWeb Page Test - Beyond the Basics
Web Page Test - Beyond the Basics
Andy Davies
 

What's hot (20)

@media - Even Faster Web Sites
@media - Even Faster Web Sites@media - Even Faster Web Sites
@media - Even Faster Web Sites
 
How fast are we going now?
How fast are we going now?How fast are we going now?
How fast are we going now?
 
Browser Wars Episode 1: The Phantom Menace
Browser Wars Episode 1: The Phantom MenaceBrowser Wars Episode 1: The Phantom Menace
Browser Wars Episode 1: The Phantom Menace
 
Frontend SPOF
Frontend SPOFFrontend SPOF
Frontend SPOF
 
do u webview?
do u webview?do u webview?
do u webview?
 
Your Script Just Killed My Site
Your Script Just Killed My SiteYour Script Just Killed My Site
Your Script Just Killed My Site
 
Web Directions South - Even Faster Web Sites
Web Directions South - Even Faster Web SitesWeb Directions South - Even Faster Web Sites
Web Directions South - Even Faster Web Sites
 
High Performance JavaScript (CapitolJS 2011)
High Performance JavaScript (CapitolJS 2011)High Performance JavaScript (CapitolJS 2011)
High Performance JavaScript (CapitolJS 2011)
 
High Performance Snippets
High Performance SnippetsHigh Performance Snippets
High Performance Snippets
 
Progressive Enhancement 2.0 (Conference Agnostic)
Progressive Enhancement 2.0 (Conference Agnostic)Progressive Enhancement 2.0 (Conference Agnostic)
Progressive Enhancement 2.0 (Conference Agnostic)
 
Metrics of Joy
Metrics of JoyMetrics of Joy
Metrics of Joy
 
Cache is King
Cache is KingCache is King
Cache is King
 
Oscon 20080724
Oscon 20080724Oscon 20080724
Oscon 20080724
 
Preconnect, prefetch, prerender...
Preconnect, prefetch, prerender...Preconnect, prefetch, prerender...
Preconnect, prefetch, prerender...
 
Going Node At Netflix
Going Node At NetflixGoing Node At Netflix
Going Node At Netflix
 
Fast Fashion… How Missguided revolutionised their approach to site performanc...
Fast Fashion… How Missguided revolutionised their approach to site performanc...Fast Fashion… How Missguided revolutionised their approach to site performanc...
Fast Fashion… How Missguided revolutionised their approach to site performanc...
 
High Performance JavaScript (Amazon DevCon 2011)
High Performance JavaScript (Amazon DevCon 2011)High Performance JavaScript (Amazon DevCon 2011)
High Performance JavaScript (Amazon DevCon 2011)
 
Front End Development for Back End Developers - vJUG24 2017
Front End Development for Back End Developers - vJUG24 2017Front End Development for Back End Developers - vJUG24 2017
Front End Development for Back End Developers - vJUG24 2017
 
Web20expo 20080425
Web20expo 20080425Web20expo 20080425
Web20expo 20080425
 
Web Page Test - Beyond the Basics
Web Page Test - Beyond the BasicsWeb Page Test - Beyond the Basics
Web Page Test - Beyond the Basics
 

Similar to State of the resource timing api

Metrics, metrics everywhere (but where the heck do you start?)
Metrics, metrics everywhere (but where the heck do you start?) Metrics, metrics everywhere (but where the heck do you start?)
Metrics, metrics everywhere (but where the heck do you start?)
SOASTA
 
Velocity NYC: Metrics, metrics everywhere (but where the heck do you start?)
Velocity NYC: Metrics, metrics everywhere (but where the heck do you start?)Velocity NYC: Metrics, metrics everywhere (but where the heck do you start?)
Velocity NYC: Metrics, metrics everywhere (but where the heck do you start?)
Cliff Crocker
 
Metrics, metrics everywhere (but where the heck do you start?)
Metrics, metrics everywhere (but where the heck do you start?)Metrics, metrics everywhere (but where the heck do you start?)
Metrics, metrics everywhere (but where the heck do you start?)
Tammy Everts
 
Performance Metrics in a Day with Selenium
Performance Metrics in a Day with SeleniumPerformance Metrics in a Day with Selenium
Performance Metrics in a Day with Selenium
Mark Watson
 
Ajax to the Moon
Ajax to the MoonAjax to the Moon
Ajax to the Moon
davejohnson
 
Sherlock Homepage - A detective story about running large web services - WebN...
Sherlock Homepage - A detective story about running large web services - WebN...Sherlock Homepage - A detective story about running large web services - WebN...
Sherlock Homepage - A detective story about running large web services - WebN...
Maarten Balliauw
 
Sherlock Homepage (Maarten Balliauw)
Sherlock Homepage (Maarten Balliauw)Sherlock Homepage (Maarten Balliauw)
Sherlock Homepage (Maarten Balliauw)
Visug
 
Sherlock Homepage - A detective story about running large web services (VISUG...
Sherlock Homepage - A detective story about running large web services (VISUG...Sherlock Homepage - A detective story about running large web services (VISUG...
Sherlock Homepage - A detective story about running large web services (VISUG...
Maarten Balliauw
 
Dave Orchard - Offline Web Apps with HTML5
Dave Orchard - Offline Web Apps with HTML5Dave Orchard - Offline Web Apps with HTML5
Dave Orchard - Offline Web Apps with HTML5
Web Directions
 
Sherlock Homepage - A detective story about running large web services - NDC ...
Sherlock Homepage - A detective story about running large web services - NDC ...Sherlock Homepage - A detective story about running large web services - NDC ...
Sherlock Homepage - A detective story about running large web services - NDC ...
Maarten Balliauw
 
12 core technologies you should learn, love, and hate to be a 'real' technocrat
12 core technologies you should learn, love, and hate to be a 'real' technocrat12 core technologies you should learn, love, and hate to be a 'real' technocrat
12 core technologies you should learn, love, and hate to be a 'real' technocrat
Jonathan Linowes
 
Using Modern Browser APIs to Improve the Performance of Your Web Applications
Using Modern Browser APIs to Improve the Performance of Your Web ApplicationsUsing Modern Browser APIs to Improve the Performance of Your Web Applications
Using Modern Browser APIs to Improve the Performance of Your Web Applications
Nicholas Jansma
 
Measuring User Experience in the Browser
Measuring User Experience in the BrowserMeasuring User Experience in the Browser
Measuring User Experience in the Browser
Alois Reitbauer
 
Play framework productivity formula
Play framework   productivity formula Play framework   productivity formula
Play framework productivity formula
Sorin Chiprian
 
Build a Node.js Client for Your REST+JSON API
Build a Node.js Client for Your REST+JSON APIBuild a Node.js Client for Your REST+JSON API
Build a Node.js Client for Your REST+JSON API
Stormpath
 
Play Framework: async I/O with Java and Scala
Play Framework: async I/O with Java and ScalaPlay Framework: async I/O with Java and Scala
Play Framework: async I/O with Java and Scala
Yevgeniy Brikman
 
Web Standards Support in WebKit
Web Standards Support in WebKitWeb Standards Support in WebKit
Web Standards Support in WebKit
Joone Hur
 
[CB16] 80時間でWebを一周:クロムミウムオートメーションによるスケーラブルなフィンガープリント by Isaac Dawson
[CB16] 80時間でWebを一周:クロムミウムオートメーションによるスケーラブルなフィンガープリント by Isaac Dawson[CB16] 80時間でWebを一周:クロムミウムオートメーションによるスケーラブルなフィンガープリント by Isaac Dawson
[CB16] 80時間でWebを一周:クロムミウムオートメーションによるスケーラブルなフィンガープリント by Isaac Dawson
CODE BLUE
 
Implementing Comet using PHP
Implementing Comet using PHPImplementing Comet using PHP
Implementing Comet using PHP
King Foo
 
Comet from JavaOne 2008
Comet from JavaOne 2008Comet from JavaOne 2008
Comet from JavaOne 2008
Joe Walker
 

Similar to State of the resource timing api (20)

Metrics, metrics everywhere (but where the heck do you start?)
Metrics, metrics everywhere (but where the heck do you start?) Metrics, metrics everywhere (but where the heck do you start?)
Metrics, metrics everywhere (but where the heck do you start?)
 
Velocity NYC: Metrics, metrics everywhere (but where the heck do you start?)
Velocity NYC: Metrics, metrics everywhere (but where the heck do you start?)Velocity NYC: Metrics, metrics everywhere (but where the heck do you start?)
Velocity NYC: Metrics, metrics everywhere (but where the heck do you start?)
 
Metrics, metrics everywhere (but where the heck do you start?)
Metrics, metrics everywhere (but where the heck do you start?)Metrics, metrics everywhere (but where the heck do you start?)
Metrics, metrics everywhere (but where the heck do you start?)
 
Performance Metrics in a Day with Selenium
Performance Metrics in a Day with SeleniumPerformance Metrics in a Day with Selenium
Performance Metrics in a Day with Selenium
 
Ajax to the Moon
Ajax to the MoonAjax to the Moon
Ajax to the Moon
 
Sherlock Homepage - A detective story about running large web services - WebN...
Sherlock Homepage - A detective story about running large web services - WebN...Sherlock Homepage - A detective story about running large web services - WebN...
Sherlock Homepage - A detective story about running large web services - WebN...
 
Sherlock Homepage (Maarten Balliauw)
Sherlock Homepage (Maarten Balliauw)Sherlock Homepage (Maarten Balliauw)
Sherlock Homepage (Maarten Balliauw)
 
Sherlock Homepage - A detective story about running large web services (VISUG...
Sherlock Homepage - A detective story about running large web services (VISUG...Sherlock Homepage - A detective story about running large web services (VISUG...
Sherlock Homepage - A detective story about running large web services (VISUG...
 
Dave Orchard - Offline Web Apps with HTML5
Dave Orchard - Offline Web Apps with HTML5Dave Orchard - Offline Web Apps with HTML5
Dave Orchard - Offline Web Apps with HTML5
 
Sherlock Homepage - A detective story about running large web services - NDC ...
Sherlock Homepage - A detective story about running large web services - NDC ...Sherlock Homepage - A detective story about running large web services - NDC ...
Sherlock Homepage - A detective story about running large web services - NDC ...
 
12 core technologies you should learn, love, and hate to be a 'real' technocrat
12 core technologies you should learn, love, and hate to be a 'real' technocrat12 core technologies you should learn, love, and hate to be a 'real' technocrat
12 core technologies you should learn, love, and hate to be a 'real' technocrat
 
Using Modern Browser APIs to Improve the Performance of Your Web Applications
Using Modern Browser APIs to Improve the Performance of Your Web ApplicationsUsing Modern Browser APIs to Improve the Performance of Your Web Applications
Using Modern Browser APIs to Improve the Performance of Your Web Applications
 
Measuring User Experience in the Browser
Measuring User Experience in the BrowserMeasuring User Experience in the Browser
Measuring User Experience in the Browser
 
Play framework productivity formula
Play framework   productivity formula Play framework   productivity formula
Play framework productivity formula
 
Build a Node.js Client for Your REST+JSON API
Build a Node.js Client for Your REST+JSON APIBuild a Node.js Client for Your REST+JSON API
Build a Node.js Client for Your REST+JSON API
 
Play Framework: async I/O with Java and Scala
Play Framework: async I/O with Java and ScalaPlay Framework: async I/O with Java and Scala
Play Framework: async I/O with Java and Scala
 
Web Standards Support in WebKit
Web Standards Support in WebKitWeb Standards Support in WebKit
Web Standards Support in WebKit
 
[CB16] 80時間でWebを一周:クロムミウムオートメーションによるスケーラブルなフィンガープリント by Isaac Dawson
[CB16] 80時間でWebを一周:クロムミウムオートメーションによるスケーラブルなフィンガープリント by Isaac Dawson[CB16] 80時間でWebを一周:クロムミウムオートメーションによるスケーラブルなフィンガープリント by Isaac Dawson
[CB16] 80時間でWebを一周:クロムミウムオートメーションによるスケーラブルなフィンガープリント by Isaac Dawson
 
Implementing Comet using PHP
Implementing Comet using PHPImplementing Comet using PHP
Implementing Comet using PHP
 
Comet from JavaOne 2008
Comet from JavaOne 2008Comet from JavaOne 2008
Comet from JavaOne 2008
 

Recently uploaded

Leading a Tableau User Group - Onboarding deck for new leaders
Leading a Tableau User Group - Onboarding deck for new leadersLeading a Tableau User Group - Onboarding deck for new leaders
Leading a Tableau User Group - Onboarding deck for new leaders
lward7
 
Brightwell ILC Futures workshop David Sinclair presentation
Brightwell ILC Futures workshop David Sinclair presentationBrightwell ILC Futures workshop David Sinclair presentation
Brightwell ILC Futures workshop David Sinclair presentation
ILC- UK
 
Dev Dives: Mining your data with AI-powered Continuous Discovery
Dev Dives: Mining your data with AI-powered Continuous DiscoveryDev Dives: Mining your data with AI-powered Continuous Discovery
Dev Dives: Mining your data with AI-powered Continuous Discovery
UiPathCommunity
 
APJC Introduction to ThousandEyes Webinar
APJC Introduction to ThousandEyes WebinarAPJC Introduction to ThousandEyes Webinar
APJC Introduction to ThousandEyes Webinar
ThousandEyes
 
Database Management Myths for Developers
Database Management Myths for DevelopersDatabase Management Myths for Developers
Database Management Myths for Developers
John Sterrett
 
Call Girls Bangalore ☎️ +91-7426014248 😍 Bangalore Call Girl Beauty Girls Ban...
Call Girls Bangalore ☎️ +91-7426014248 😍 Bangalore Call Girl Beauty Girls Ban...Call Girls Bangalore ☎️ +91-7426014248 😍 Bangalore Call Girl Beauty Girls Ban...
Call Girls Bangalore ☎️ +91-7426014248 😍 Bangalore Call Girl Beauty Girls Ban...
anilsa9823
 
ThousandEyes New Product Features and Release Highlights: June 2024
ThousandEyes New Product Features and Release Highlights: June 2024ThousandEyes New Product Features and Release Highlights: June 2024
ThousandEyes New Product Features and Release Highlights: June 2024
ThousandEyes
 
“Efficiency Unleashed: The Next-gen NXP i.MX 95 Applications Processor for Em...
“Efficiency Unleashed: The Next-gen NXP i.MX 95 Applications Processor for Em...“Efficiency Unleashed: The Next-gen NXP i.MX 95 Applications Processor for Em...
“Efficiency Unleashed: The Next-gen NXP i.MX 95 Applications Processor for Em...
Edge AI and Vision Alliance
 
The "Zen" of Python Exemplars - OTel Community Day
The "Zen" of Python Exemplars - OTel Community DayThe "Zen" of Python Exemplars - OTel Community Day
The "Zen" of Python Exemplars - OTel Community Day
Paige Cruz
 
Chapter 1 - Fundamentals of Testing V4.0
Chapter 1 - Fundamentals of Testing V4.0Chapter 1 - Fundamentals of Testing V4.0
Chapter 1 - Fundamentals of Testing V4.0
Neeraj Kumar Singh
 
Chapter 6 - Test Tools Considerations V4.0
Chapter 6 - Test Tools Considerations V4.0Chapter 6 - Test Tools Considerations V4.0
Chapter 6 - Test Tools Considerations V4.0
Neeraj Kumar Singh
 
Corporate Open Source Anti-Patterns: A Decade Later
Corporate Open Source Anti-Patterns: A Decade LaterCorporate Open Source Anti-Patterns: A Decade Later
Corporate Open Source Anti-Patterns: A Decade Later
ScyllaDB
 
Cassandra to ScyllaDB: Technical Comparison and the Path to Success
Cassandra to ScyllaDB: Technical Comparison and the Path to SuccessCassandra to ScyllaDB: Technical Comparison and the Path to Success
Cassandra to ScyllaDB: Technical Comparison and the Path to Success
ScyllaDB
 
this resume for sadika shaikh bca student
this resume for sadika shaikh bca studentthis resume for sadika shaikh bca student
this resume for sadika shaikh bca student
SadikaShaikh7
 
Balancing Compaction Principles and Practices
Balancing Compaction Principles and PracticesBalancing Compaction Principles and Practices
Balancing Compaction Principles and Practices
ScyllaDB
 
Call Girls Firozabad ☎️ +91-7426014248 😍 Firozabad Call Girl Beauty Girls Fir...
Call Girls Firozabad ☎️ +91-7426014248 😍 Firozabad Call Girl Beauty Girls Fir...Call Girls Firozabad ☎️ +91-7426014248 😍 Firozabad Call Girl Beauty Girls Fir...
Call Girls Firozabad ☎️ +91-7426014248 😍 Firozabad Call Girl Beauty Girls Fir...
jiaulalam7655
 
Leveraging AI for Software Developer Productivity.pptx
Leveraging AI for Software Developer Productivity.pptxLeveraging AI for Software Developer Productivity.pptx
Leveraging AI for Software Developer Productivity.pptx
petabridge
 
Call Girls Chennai ☎️ +91-7426014248 😍 Chennai Call Girl Beauty Girls Chennai...
Call Girls Chennai ☎️ +91-7426014248 😍 Chennai Call Girl Beauty Girls Chennai...Call Girls Chennai ☎️ +91-7426014248 😍 Chennai Call Girl Beauty Girls Chennai...
Call Girls Chennai ☎️ +91-7426014248 😍 Chennai Call Girl Beauty Girls Chennai...
anilsa9823
 
Multimodal Retrieval Augmented Generation (RAG) with Milvus
Multimodal Retrieval Augmented Generation (RAG) with MilvusMultimodal Retrieval Augmented Generation (RAG) with Milvus
Multimodal Retrieval Augmented Generation (RAG) with Milvus
Zilliz
 
Kubernetes Cloud Native Indonesia Meetup - June 2024
Kubernetes Cloud Native Indonesia Meetup - June 2024Kubernetes Cloud Native Indonesia Meetup - June 2024
Kubernetes Cloud Native Indonesia Meetup - June 2024
Prasta Maha
 

Recently uploaded (20)

Leading a Tableau User Group - Onboarding deck for new leaders
Leading a Tableau User Group - Onboarding deck for new leadersLeading a Tableau User Group - Onboarding deck for new leaders
Leading a Tableau User Group - Onboarding deck for new leaders
 
Brightwell ILC Futures workshop David Sinclair presentation
Brightwell ILC Futures workshop David Sinclair presentationBrightwell ILC Futures workshop David Sinclair presentation
Brightwell ILC Futures workshop David Sinclair presentation
 
Dev Dives: Mining your data with AI-powered Continuous Discovery
Dev Dives: Mining your data with AI-powered Continuous DiscoveryDev Dives: Mining your data with AI-powered Continuous Discovery
Dev Dives: Mining your data with AI-powered Continuous Discovery
 
APJC Introduction to ThousandEyes Webinar
APJC Introduction to ThousandEyes WebinarAPJC Introduction to ThousandEyes Webinar
APJC Introduction to ThousandEyes Webinar
 
Database Management Myths for Developers
Database Management Myths for DevelopersDatabase Management Myths for Developers
Database Management Myths for Developers
 
Call Girls Bangalore ☎️ +91-7426014248 😍 Bangalore Call Girl Beauty Girls Ban...
Call Girls Bangalore ☎️ +91-7426014248 😍 Bangalore Call Girl Beauty Girls Ban...Call Girls Bangalore ☎️ +91-7426014248 😍 Bangalore Call Girl Beauty Girls Ban...
Call Girls Bangalore ☎️ +91-7426014248 😍 Bangalore Call Girl Beauty Girls Ban...
 
ThousandEyes New Product Features and Release Highlights: June 2024
ThousandEyes New Product Features and Release Highlights: June 2024ThousandEyes New Product Features and Release Highlights: June 2024
ThousandEyes New Product Features and Release Highlights: June 2024
 
“Efficiency Unleashed: The Next-gen NXP i.MX 95 Applications Processor for Em...
“Efficiency Unleashed: The Next-gen NXP i.MX 95 Applications Processor for Em...“Efficiency Unleashed: The Next-gen NXP i.MX 95 Applications Processor for Em...
“Efficiency Unleashed: The Next-gen NXP i.MX 95 Applications Processor for Em...
 
The "Zen" of Python Exemplars - OTel Community Day
The "Zen" of Python Exemplars - OTel Community DayThe "Zen" of Python Exemplars - OTel Community Day
The "Zen" of Python Exemplars - OTel Community Day
 
Chapter 1 - Fundamentals of Testing V4.0
Chapter 1 - Fundamentals of Testing V4.0Chapter 1 - Fundamentals of Testing V4.0
Chapter 1 - Fundamentals of Testing V4.0
 
Chapter 6 - Test Tools Considerations V4.0
Chapter 6 - Test Tools Considerations V4.0Chapter 6 - Test Tools Considerations V4.0
Chapter 6 - Test Tools Considerations V4.0
 
Corporate Open Source Anti-Patterns: A Decade Later
Corporate Open Source Anti-Patterns: A Decade LaterCorporate Open Source Anti-Patterns: A Decade Later
Corporate Open Source Anti-Patterns: A Decade Later
 
Cassandra to ScyllaDB: Technical Comparison and the Path to Success
Cassandra to ScyllaDB: Technical Comparison and the Path to SuccessCassandra to ScyllaDB: Technical Comparison and the Path to Success
Cassandra to ScyllaDB: Technical Comparison and the Path to Success
 
this resume for sadika shaikh bca student
this resume for sadika shaikh bca studentthis resume for sadika shaikh bca student
this resume for sadika shaikh bca student
 
Balancing Compaction Principles and Practices
Balancing Compaction Principles and PracticesBalancing Compaction Principles and Practices
Balancing Compaction Principles and Practices
 
Call Girls Firozabad ☎️ +91-7426014248 😍 Firozabad Call Girl Beauty Girls Fir...
Call Girls Firozabad ☎️ +91-7426014248 😍 Firozabad Call Girl Beauty Girls Fir...Call Girls Firozabad ☎️ +91-7426014248 😍 Firozabad Call Girl Beauty Girls Fir...
Call Girls Firozabad ☎️ +91-7426014248 😍 Firozabad Call Girl Beauty Girls Fir...
 
Leveraging AI for Software Developer Productivity.pptx
Leveraging AI for Software Developer Productivity.pptxLeveraging AI for Software Developer Productivity.pptx
Leveraging AI for Software Developer Productivity.pptx
 
Call Girls Chennai ☎️ +91-7426014248 😍 Chennai Call Girl Beauty Girls Chennai...
Call Girls Chennai ☎️ +91-7426014248 😍 Chennai Call Girl Beauty Girls Chennai...Call Girls Chennai ☎️ +91-7426014248 😍 Chennai Call Girl Beauty Girls Chennai...
Call Girls Chennai ☎️ +91-7426014248 😍 Chennai Call Girl Beauty Girls Chennai...
 
Multimodal Retrieval Augmented Generation (RAG) with Milvus
Multimodal Retrieval Augmented Generation (RAG) with MilvusMultimodal Retrieval Augmented Generation (RAG) with Milvus
Multimodal Retrieval Augmented Generation (RAG) with Milvus
 
Kubernetes Cloud Native Indonesia Meetup - June 2024
Kubernetes Cloud Native Indonesia Meetup - June 2024Kubernetes Cloud Native Indonesia Meetup - June 2024
Kubernetes Cloud Native Indonesia Meetup - June 2024
 

State of the resource timing api

  • 1. State of the Resource Timing API Aaron Peters aaron@turbobytes.com WebPerfDays Amsterdam, May 18 2013
  • 2. What is the Resource Timing API? API in the browser that exposes load time data for page resources. "Navigation Timing API for for page objects"
  • 3. How get timing data via the API? window.performance.getEntriesByType("resource")[1] { connectEnd: 298.0000000097789 connectStart: 298.0000000097789 domainLookupEnd: 298.0000000097789 domainLookupStart: 298.0000000097789 duration: 682.9999999608845 entryType: "resource" fetchStart: 298.0000000097789 initiatorType: "css" name: "http://st.cdnplanet.com/static/fonts/amaranth-bold-webfont.woff" redirectEnd: 0 redirectStart: 0 requestStart: 946.9999999962747 responseEnd: 980.9999999706633 responseStart: 962.9999999962747 secureConnectionStart: 0 startTime: 298.0000000097789 }
  • 4. Is the API ready for use? Spec is not final yet. W3C Candidate Recommendation API currently implemented in a few browsers: ● IE10 ● Chrome, Chrome Mobile, Chrome Frame Does it behave constistently & according to the spec?
  • 5. 12 things you should know when using the API
  • 6. When does the API make data available for a resource? While it's loading (OMG!) Bug? Yes, but useful "Did main.css finish loading within 5 seconds?" After the resource has finished loading This is according to spec
  • 7. Timing-Allow-Origin: must be * Spec states: T-A-O must be either origin-list-or-null (RFC 6454) or * In both browsers, only * works. This does not work today: ● host: www.aaronpeters.nl ● scheme + host: http://www.aaronpeters.nl/ ● scheme + host + port: http://www.aaronpeters.nl: 80/
  • 8. Detect browser disk cache hits Yes, you can! if( requestStart == fetchStart && requestStart == responseStart && responseStart != responseEnd ) { // disk cache hit } Note: IE10 Dev Tools shows 304 when actually is a disk cache hit. Yes, you can! if( domainLookupStart != 0 && requestStart == 0 ) { //disk cache hit } Chrome says it's a bug, I say it is a feature
  • 9. Browser memory cache hits? Not exposed by the API: there is no data for the resource This is a bug ??? I have no idea how to test for a memory cache hit in IE10
  • 10. Detect 4xx/5xx responses? Not exposed by the API: there is no data for the resource This is a bug Data available via API Looks same as cross-origin 200 response without valid T-A-O header: all timing attributes equal zero, except startTime, fetchStart, duration and responseEnd
  • 11. domainLookupStart = 0, huh? Sometimes, in Chrome, domainLookupStart = 0, even when a valid Timing-Allow-Header is present. This is always impossible. if(domainLookupStart < fetchStart){ // abort! }
  • 12. DNS lookup & Connect times unavailable in IE10 Values of the 4 relevant attributes are always zero. It's a bug.
  • 13. IE10, y u no show SSL time? sslTime = connectEnd - secureConnectionStart Chrome's behavior is in line with Navigation Timing API behavior, but Resource Timing spec has conflicting info. That will be fixed. Not exposed by the API secureConnectionStart attribute is not present ! Actually, the attribute is optional according to the spec
  • 14. Track 'wait time' How long is a resource in queue, waiting to be fetched? If many resources have high waitTime, there is an optimization opportunity (domain sharding?) if(connectEnd == fetchStart){ waitTime = requestStart - connectEnd } else { waitTime = domainLookupStart - fetchStart }
  • 15. duration is useless Same origin resource || valid T-A-O header Has no added value. What specific insight can be gained from duration? Cross-origin resource No insight in split between 'wait time' and 'load time', so how can duration possibly be informative? duration = responseEnd - startTime
  • 16. Ignore all data in Chrome Frame Data is exposed by the API, but it's bad data. Objects fetched over network 'look' like browser disk cache hits if(!window.externalHost){ // not Chrome Frame }
  • 17. Bytesize is not exposed :( You can't know how many bytes were transferred. A deliberate 'feature', for security reasons. I strongly disagree. Knowing the bytesize is essential for understanding resource load time. Why not make it opt-in to expose bytesize? Let the publisher be in control! This discussion with the Working Group is not finished!
  • 19. Chrome currently uses a vendor prefix, eg. webkitGetEntriesByType("resource") When they switch to Blink, the prefix will be gone Firefox will support the API soon(-ish), likely sans prefix. Low activity on bug 822480 Safari & Opera will likely not have the API anytime soon: they don't even support Navigation Timing API ! Future browser support
  • 20. if one value doesn't make sense, discard all values Be safe
  • 21. Thank you ! Aaron Peters aaron@turbobytes.com WebPerfDays Amsterdam, May 18 2013 www.aaronpeters.nl/blog/state-of-resource-timing-api