The Psychology of Speed
Simon Hearne
Web Performance Architect
It's all about the wait... and we know a lot about waiting ...
Waiting is frustrating, demoralizing, agonizing, aggravating, annoying, time consuming and incredibly expensive.
Three rules for waiting times
Unoccupied time feels longer than occupied time
Anxiety makes waits seem longer
Unknown waits feel longer than known waits
Humans hate wasted time
Give feedback within 100ms
Update every 1,000ms
Complete actions within 3,000ms
Miller, R. B. (1968). Response time in man-computer conversational transactions.
Occupying time on the web
Show something, fast
Fill UX gaps
Prioritise what matters
Show what you've got!
Show what you've got!
Show what you've got!
No blocking scripts
No external CSS
HTML doc < 50kB
Fill UX gaps
Fill UX gaps
Dino?
press 'q' to jump!
Measuring time to start
Time to Title
First Contentful Paint
Hero Element timers
Anxiety on the Web
Did that work?
Can I click on it yet?
Is it broken?
Reducing Anxiety
Maintain Visual Stability
Use optimistic UI patterns
Give user feedback
Reducing layout shifts
font-display: [ optional | block ] 😕
pre-allocate ad slots
size attributes on images
box-sizing: border-box
overflow-y: scroll
Optimistic UI (1)
The animation is exactly 300ms, I wonder how close that is to the average response from the API?
Optimistic UI (1)
Failed requests are queued and retried
Give user feedback
Add to bag Adding... Done!
Give user feedback
Keep it in context
Animation buys you 250 - 500ms
:active is a quick fix
Click me!
Click me!
Reducing Anxiety
Maintain Visual Stability
Use optimistic UI patterns
Give user feedback
Uncertainty on the web
Show something recognisable like a site logo, give progress indication.
Am I in the right place?
How long is this going to take?
Is it broken?
Creating certainty
Anchor your user
Give timelines
Active listening / feedback
Humanise the Task
Explain the wait
What about when things go wrong?
Simply recognising a poor experience resulted in 50% longer game play
Active feedback strategy
Measure how long it normally takes
Set a budget based on 90th - 95th percentile
Show an apologetic message after this time
Active feedback in the wild
Measuring how long it takes
4.7s?
Measuring how long it takes
2.4s?
Reducing unexplained waits
Show your logo early
Humanise the wait
Use progress indicators
Acknowledge when UX is slow
Top tips for happy users 🙂
Show something, fast
Give instant feedback
Use optimistic UI patterns
Use progress indication
Explain long waits
Web wait types
Page loads
In-app Navigations
User Actions
Goals for maximum engagement
Metric Goal
Cumulative Layout Shift 0
First Input Delay 100ms
First Contentful Paint 1,000ms
Largest Contentful Paint 3,000ms
Time To Interactive 3,500ms
Based on aggregate data - what are yours?
Goals for maximum engagement
Metric Goal
Cumulative Layout Shift 0
First Input Delay 50ms
First Contentful Paint 1,000ms
Largest Contentful Paint 3,000ms
Time To Interactive 3,500ms
Based on aggregate data - what are yours?
🤔 this sounds familiar...
Are Core Web Vitals the holy grail?
Core Web Vitals are proxies for UX
Only on Chromium-based browsers
Designed to be universal
FID might not be actionable
SPA soft navigations not supported in CRUX
Core Web Vitals provide a bridge between business and technology, but may not be the best metrics for your application.
What about user interactions?
performance.mark('spinner-start');
//... waiting ...
performance.mark('spinner-end');
performance.measure('wait-duration','spinner-start','spinner-end');
performance.mark() | MDN
RUM is critical
Capture data in the client
Support 100% data capture
Custom percentiles
User Timing support
XHR / Fetch capture
Hacking perceived waitsAKA: making waits feel less waity
Anticipate Behaviourcheat with mouse events
Click Me!
Event Free Time!
touchStart -
mouseOver -
mouseDown -
click -
Use to anticipate navigations, product viewer actions etc.
Non-linear progress indicators
If the early feedback indicated slow progress, abandonment rates were higher and users' subjective experience more negative than if the early feedback indicated faster progress.