SlideShare uma empresa Scribd logo
1 de 20
Baixar para ler offline
FASTEST REQUEST
IS NEVER MADE
Effective use of Browser HTTP Cache
Sergey Chernyshev
@sergeyche
NYC JavaScript React GroupAugust 31, 2017
Why do we care?
Awesome Website!
Sloooowly
Slow Means Lower Conversion
Conversion Rate vs. Page Load time
0-1 1-2 2-3 3-4 4-5 5-6 6-7 7-8 8-9 9-10 10-11 11-12 12-13 13-14 14-15 15+
Conversion Sessions
RUM data. Cliff Crocker @ Wallmart Labs
Fred Wilson
Managing Partner, Union Square Ventures @ NYC
http://www.aVC.com/
“1. Speed is
the most
important
feature.”
10 Golden Principles of Successful Web Apps http://vimeo.com/10510576
Stats
➤ Pinterest: 40% faster => +15% SEO traffic, 15% conversion rate (2017)
➤ Trainline: -0.3s => +$11.5M / year revenue (2016(
➤ Etsy: +160Kb => +12% bounce rate (2014)
➤ DoubleClick: -1 redirect => +12% CTR (2011)
➤ Edmunds: -77% load time => +20% page views (2011)
➤ Mozilla: -2.2s => +15.4% Downloads (2010)
➤ Google: +400ms => -0.21% searches after experiment! (2009)
➤ Shopzilla: -5s => +12% Conversion rate (2009)
➤ Netflix: +GZip => -43% Traffic cost (2008)
➤ Amazon: +100ms => -1% revenue (2008)
➤ Google: +500ms => -25% searches (2006)
http://WPOStats.com/
WHAT DOES MY SITE COST? WHATDOESMYSITECOST.COM
http://www.disney.com/
% OF DAILY BUDGET WHATDOESMYSITECOST.COM
http://www.disney.com/
slownesskills.com
THERE ARE
NO
CACHING PROBLEMS
only caching solutions
Tim Berners-Lee Waterfalls
• Initial Load
• Re-validation
• Expiration
Last-Modified: <date>
ETag: xyz987
GET /main.css
Tim Berners-Lee Waterfalls
• Initial Load
• Re-validation
• Expiration
If-Modified-Since: <date>
If-None-Match: xyz987
304 Not Modified
GET /main.css
Waterfall of
Useless 304s
Tim Berners-Lee Waterfalls
• Initial Load
• Re-validation
• Expiration Cache-Control: max-age=86400
GET /main.css
Fingerprinting
• Initial Load
• Re-validation
• Expiration
GET /main.xyz987.css
Cache-Control: max-age=86400
DEMO
Webpack
• Set infinite cache headers
• Consistent validation tokens for fingerprints
using webpack-md5-hash
• Chunk it up
• [chunkhash] / [hash] in file name
• Use webpack-manifest-plugin or html-
webpack-plugin
Reading Materials
• Easy Cache Headers, PerfPlanet Calendar:

https://calendar.perfplanet.com/2010/
easy-cache-headers/
• HTTP Caching, Ilya Grigorik:

https://developers.google.com/web/
fundamentals/performance/optimizing-
content-efficiency/http-caching
• Cache all the way, Yoav Weiss:

https://m.youtube.com/watch?
v=lTxqaHS9Svs

Mais conteúdo relacionado

Semelhante a Fastest request is never made

Semelhante a Fastest request is never made (20)

Introduction to web performance @ IEEE
Introduction to web performance @ IEEEIntroduction to web performance @ IEEE
Introduction to web performance @ IEEE
 
Web performance: beyond load testing
Web performance: beyond load testingWeb performance: beyond load testing
Web performance: beyond load testing
 
Web Performance Optimization
Web Performance OptimizationWeb Performance Optimization
Web Performance Optimization
 
How to Migrate to HTTPS and Win at SEO (in Plain English)
How to Migrate to HTTPS and Win at SEO (in Plain English)How to Migrate to HTTPS and Win at SEO (in Plain English)
How to Migrate to HTTPS and Win at SEO (in Plain English)
 
Why Security is the New Go Faster Stripe | Crystal Carter | Brighton SEO
Why Security is the New Go Faster Stripe | Crystal Carter | Brighton SEOWhy Security is the New Go Faster Stripe | Crystal Carter | Brighton SEO
Why Security is the New Go Faster Stripe | Crystal Carter | Brighton SEO
 
2021 Chrome Dev Summit: Web Performance 101
2021 Chrome Dev Summit: Web Performance 1012021 Chrome Dev Summit: Web Performance 101
2021 Chrome Dev Summit: Web Performance 101
 
Wordcamp 2017-toronto-sam lalonde
Wordcamp 2017-toronto-sam lalondeWordcamp 2017-toronto-sam lalonde
Wordcamp 2017-toronto-sam lalonde
 
2020 Chrome Dev Summit: Web Performance 101
2020 Chrome Dev Summit: Web Performance 1012020 Chrome Dev Summit: Web Performance 101
2020 Chrome Dev Summit: Web Performance 101
 
L lamasoft
L lamasoftL lamasoft
L lamasoft
 
Impact of web latency on conversion rates
Impact of web latency on conversion ratesImpact of web latency on conversion rates
Impact of web latency on conversion rates
 
Keys To World-Class Retail Web Performance - Expert tips for holiday web read...
Keys To World-Class Retail Web Performance - Expert tips for holiday web read...Keys To World-Class Retail Web Performance - Expert tips for holiday web read...
Keys To World-Class Retail Web Performance - Expert tips for holiday web read...
 
MeasureWorks - Why people hate to wait for your website to load (and how to f...
MeasureWorks - Why people hate to wait for your website to load (and how to f...MeasureWorks - Why people hate to wait for your website to load (and how to f...
MeasureWorks - Why people hate to wait for your website to load (and how to f...
 
Demystifying Website Performance and Its Impact on Revenue
Demystifying Website Performance and Its Impact on RevenueDemystifying Website Performance and Its Impact on Revenue
Demystifying Website Performance and Its Impact on Revenue
 
Carolyn Shelby #SEJSummit: SEO Tune Up
Carolyn Shelby #SEJSummit: SEO Tune Up Carolyn Shelby #SEJSummit: SEO Tune Up
Carolyn Shelby #SEJSummit: SEO Tune Up
 
SEO Tune Up: Technical and Performance
SEO Tune Up: Technical and PerformanceSEO Tune Up: Technical and Performance
SEO Tune Up: Technical and Performance
 
Synthetic and RUM - Best of bo
Synthetic and RUM - Best of boSynthetic and RUM - Best of bo
Synthetic and RUM - Best of bo
 
Ruby on Rails Performance Tuning. Make it faster, make it better (WindyCityRa...
Ruby on Rails Performance Tuning. Make it faster, make it better (WindyCityRa...Ruby on Rails Performance Tuning. Make it faster, make it better (WindyCityRa...
Ruby on Rails Performance Tuning. Make it faster, make it better (WindyCityRa...
 
Windy cityrails performance_tuning
Windy cityrails performance_tuningWindy cityrails performance_tuning
Windy cityrails performance_tuning
 
Web performance e-book
Web performance e-bookWeb performance e-book
Web performance e-book
 
Designers Guide to Web Performance Yotta 2013
Designers Guide to Web Performance Yotta 2013Designers Guide to Web Performance Yotta 2013
Designers Guide to Web Performance Yotta 2013
 

Mais de SergeyChernyshev

Mais de SergeyChernyshev (20)

Capturing speed of user experience using user timing api
Capturing speed of user experience using user timing apiCapturing speed of user experience using user timing api
Capturing speed of user experience using user timing api
 
Managing application performance by Kwame Thomison
Managing application performance by Kwame ThomisonManaging application performance by Kwame Thomison
Managing application performance by Kwame Thomison
 
Designing speed with progressive enhancement
Designing speed with progressive enhancementDesigning speed with progressive enhancement
Designing speed with progressive enhancement
 
Web performance tools @ WebPerf.camp 2016
Web performance tools @ WebPerf.camp 2016Web performance tools @ WebPerf.camp 2016
Web performance tools @ WebPerf.camp 2016
 
Extending your applications to the edge with CDNs
Extending your applications to the edge with CDNsExtending your applications to the edge with CDNs
Extending your applications to the edge with CDNs
 
Speed is feature #1
Speed is feature #1Speed is feature #1
Speed is feature #1
 
Tools of the trade 2014
Tools of the trade 2014Tools of the trade 2014
Tools of the trade 2014
 
What we can learn from CDNs about Web Development, Deployment, and Performance
What we can learn from CDNs about Web Development, Deployment, and PerformanceWhat we can learn from CDNs about Web Development, Deployment, and Performance
What we can learn from CDNs about Web Development, Deployment, and Performance
 
Scalability vs. Performance
Scalability vs. PerformanceScalability vs. Performance
Scalability vs. Performance
 
Introduction to Web Performance
Introduction to Web PerformanceIntroduction to Web Performance
Introduction to Web Performance
 
Performance anti patterns in ajax applications
Performance anti patterns in ajax applicationsPerformance anti patterns in ajax applications
Performance anti patterns in ajax applications
 
Taming 3rd party content
Taming 3rd party contentTaming 3rd party content
Taming 3rd party content
 
Velocity 2010 review
Velocity 2010 reviewVelocity 2010 review
Velocity 2010 review
 
Keeping track of your performance using Show Slow
Keeping track of your performance using Show SlowKeeping track of your performance using Show Slow
Keeping track of your performance using Show Slow
 
Keeping track of your performance using show slow
Keeping track of your performance using show slowKeeping track of your performance using show slow
Keeping track of your performance using show slow
 
In Search of Speed
In Search of SpeedIn Search of Speed
In Search of Speed
 
Building your own CDN using Amazon EC2
Building your own CDN using Amazon EC2Building your own CDN using Amazon EC2
Building your own CDN using Amazon EC2
 
Php Code Profiling Using X Debug
Php Code Profiling Using X DebugPhp Code Profiling Using X Debug
Php Code Profiling Using X Debug
 
Why RDFa?
Why RDFa?Why RDFa?
Why RDFa?
 
Introduction to RDFa
Introduction to RDFaIntroduction to RDFa
Introduction to RDFa
 

Último

6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
@Chandigarh #call #Girls 9053900678 @Call #Girls in @Punjab 9053900678
 
💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
nirzagarg
 
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
ydyuyu
 
( Pune ) VIP Pimpri Chinchwad Call Girls 🎗️ 9352988975 Sizzling | Escorts | G...
( Pune ) VIP Pimpri Chinchwad Call Girls 🎗️ 9352988975 Sizzling | Escorts | G...( Pune ) VIP Pimpri Chinchwad Call Girls 🎗️ 9352988975 Sizzling | Escorts | G...
( Pune ) VIP Pimpri Chinchwad Call Girls 🎗️ 9352988975 Sizzling | Escorts | G...
nilamkumrai
 

Último (20)

6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
 
Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...
Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...
Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...
 
Microsoft Azure Arc Customer Deck Microsoft
Microsoft Azure Arc Customer Deck MicrosoftMicrosoft Azure Arc Customer Deck Microsoft
Microsoft Azure Arc Customer Deck Microsoft
 
(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7
(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7
(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7
 
Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.
 
Pirangut | Call Girls Pune Phone No 8005736733 Elite Escort Service Available...
Pirangut | Call Girls Pune Phone No 8005736733 Elite Escort Service Available...Pirangut | Call Girls Pune Phone No 8005736733 Elite Escort Service Available...
Pirangut | Call Girls Pune Phone No 8005736733 Elite Escort Service Available...
 
VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...
VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...
VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...
 
Al Barsha Night Partner +0567686026 Call Girls Dubai
Al Barsha Night Partner +0567686026 Call Girls  DubaiAl Barsha Night Partner +0567686026 Call Girls  Dubai
Al Barsha Night Partner +0567686026 Call Girls Dubai
 
Wagholi & High Class Call Girls Pune Neha 8005736733 | 100% Gennuine High Cla...
Wagholi & High Class Call Girls Pune Neha 8005736733 | 100% Gennuine High Cla...Wagholi & High Class Call Girls Pune Neha 8005736733 | 100% Gennuine High Cla...
Wagholi & High Class Call Girls Pune Neha 8005736733 | 100% Gennuine High Cla...
 
VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...
VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...
VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...
 
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
 
Yerawada ] Independent Escorts in Pune - Book 8005736733 Call Girls Available...
Yerawada ] Independent Escorts in Pune - Book 8005736733 Call Girls Available...Yerawada ] Independent Escorts in Pune - Book 8005736733 Call Girls Available...
Yerawada ] Independent Escorts in Pune - Book 8005736733 Call Girls Available...
 
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...
 
Dubai=Desi Dubai Call Girls O525547819 Outdoor Call Girls Dubai
Dubai=Desi Dubai Call Girls O525547819 Outdoor Call Girls DubaiDubai=Desi Dubai Call Girls O525547819 Outdoor Call Girls Dubai
Dubai=Desi Dubai Call Girls O525547819 Outdoor Call Girls Dubai
 
💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
 
Pune Airport ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready...
Pune Airport ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready...Pune Airport ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready...
Pune Airport ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready...
 
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
 
( Pune ) VIP Pimpri Chinchwad Call Girls 🎗️ 9352988975 Sizzling | Escorts | G...
( Pune ) VIP Pimpri Chinchwad Call Girls 🎗️ 9352988975 Sizzling | Escorts | G...( Pune ) VIP Pimpri Chinchwad Call Girls 🎗️ 9352988975 Sizzling | Escorts | G...
( Pune ) VIP Pimpri Chinchwad Call Girls 🎗️ 9352988975 Sizzling | Escorts | G...
 
Russian Call Girls in %(+971524965298 )# Call Girls in Dubai
Russian Call Girls in %(+971524965298  )#  Call Girls in DubaiRussian Call Girls in %(+971524965298  )#  Call Girls in Dubai
Russian Call Girls in %(+971524965298 )# Call Girls in Dubai
 
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)
 

Fastest request is never made

  • 1. FASTEST REQUEST IS NEVER MADE Effective use of Browser HTTP Cache Sergey Chernyshev @sergeyche NYC JavaScript React GroupAugust 31, 2017
  • 2. Why do we care?
  • 4.
  • 6. Slow Means Lower Conversion Conversion Rate vs. Page Load time 0-1 1-2 2-3 3-4 4-5 5-6 6-7 7-8 8-9 9-10 10-11 11-12 12-13 13-14 14-15 15+ Conversion Sessions RUM data. Cliff Crocker @ Wallmart Labs
  • 7. Fred Wilson Managing Partner, Union Square Ventures @ NYC http://www.aVC.com/ “1. Speed is the most important feature.” 10 Golden Principles of Successful Web Apps http://vimeo.com/10510576
  • 8. Stats ➤ Pinterest: 40% faster => +15% SEO traffic, 15% conversion rate (2017) ➤ Trainline: -0.3s => +$11.5M / year revenue (2016( ➤ Etsy: +160Kb => +12% bounce rate (2014) ➤ DoubleClick: -1 redirect => +12% CTR (2011) ➤ Edmunds: -77% load time => +20% page views (2011) ➤ Mozilla: -2.2s => +15.4% Downloads (2010) ➤ Google: +400ms => -0.21% searches after experiment! (2009) ➤ Shopzilla: -5s => +12% Conversion rate (2009) ➤ Netflix: +GZip => -43% Traffic cost (2008) ➤ Amazon: +100ms => -1% revenue (2008) ➤ Google: +500ms => -25% searches (2006) http://WPOStats.com/
  • 9. WHAT DOES MY SITE COST? WHATDOESMYSITECOST.COM http://www.disney.com/
  • 10. % OF DAILY BUDGET WHATDOESMYSITECOST.COM http://www.disney.com/
  • 13. Tim Berners-Lee Waterfalls • Initial Load • Re-validation • Expiration Last-Modified: <date> ETag: xyz987 GET /main.css
  • 14. Tim Berners-Lee Waterfalls • Initial Load • Re-validation • Expiration If-Modified-Since: <date> If-None-Match: xyz987 304 Not Modified GET /main.css
  • 16. Tim Berners-Lee Waterfalls • Initial Load • Re-validation • Expiration Cache-Control: max-age=86400 GET /main.css
  • 17. Fingerprinting • Initial Load • Re-validation • Expiration GET /main.xyz987.css Cache-Control: max-age=86400
  • 18. DEMO
  • 19. Webpack • Set infinite cache headers • Consistent validation tokens for fingerprints using webpack-md5-hash • Chunk it up • [chunkhash] / [hash] in file name • Use webpack-manifest-plugin or html- webpack-plugin
  • 20. Reading Materials • Easy Cache Headers, PerfPlanet Calendar:
 https://calendar.perfplanet.com/2010/ easy-cache-headers/ • HTTP Caching, Ilya Grigorik:
 https://developers.google.com/web/ fundamentals/performance/optimizing- content-efficiency/http-caching • Cache all the way, Yoav Weiss:
 https://m.youtube.com/watch? v=lTxqaHS9Svs