SlideShare a Scribd company logo

Caching for the Mobile Web and Macklemore's Thrift Shop

From the New York Front End Coders Meetup on Sept 13, 2013. Ninjas and rockstars are poor role models. This talk is about caching for the mobile web

1 of 18
Download to read offline
Caching for the Mobile Web and
Macklemore's Thrift Shop
by @rubikzube
Sometimes I make poor decisions
The rest of the time
● I work on shutterstock.mobi
● Eventually needs to handle 100k
visits per day around the world
● Uses a handful of web servers
● That means serious caching
Caching means better performance
for users and servers
1. Make fewer requests
2. Fetch smaller resources
3. Travel shorter distances
4. Use generic pages that are cacheable
Don’t kill the servers
Do serve fast pages
Start by hunting for easy wins
● Use yslow and pagespeed to find ways to make fewer
requests and to fetch smaller resources
● Try to score in the high 80s - low 90s
● Minifying, concatenating, and gzipping is only the
first step
I’m, I’m hunting,
looking for a come up,
this is f*cking awesome
HTTP basics are important too
● HTTP is a core protocol of the internet
● HTTP headers determine how content will be cached
on the browser AND along the network
● If HTTP headers are set properly the browser will
travel shorter distances
Imma take your
grandpa’s style

Recommended

Web Service and Mobile Integrated Day II
Web Service and Mobile Integrated Day IIWeb Service and Mobile Integrated Day II
Web Service and Mobile Integrated Day IIAnuchit Chalothorn
 
JSinSa 2015 - Progressive Saving Using LocalStorage
JSinSa 2015 - Progressive Saving Using LocalStorageJSinSa 2015 - Progressive Saving Using LocalStorage
JSinSa 2015 - Progressive Saving Using LocalStorageDaphneCalitz
 
Pop quiz, hotshot how fast can your word press site go
Pop quiz, hotshot  how fast can your word press site goPop quiz, hotshot  how fast can your word press site go
Pop quiz, hotshot how fast can your word press site goRobert Bailey
 
Web Service and Mobile Integrated Day I
Web Service and Mobile Integrated Day IWeb Service and Mobile Integrated Day I
Web Service and Mobile Integrated Day IAnuchit Chalothorn
 
Predicting user activity to make the web fast presentation
Predicting user activity to make the web fast presentationPredicting user activity to make the web fast presentation
Predicting user activity to make the web fast presentationJustin Dorfman
 
SEO best practices to increase your page speed
SEO best practices to increase your page speedSEO best practices to increase your page speed
SEO best practices to increase your page speedDigileap
 
Web performance mercadolibre - ECI 2013
Web performance   mercadolibre - ECI 2013Web performance   mercadolibre - ECI 2013
Web performance mercadolibre - ECI 2013Santiago Aimetta
 

More Related Content

What's hot

Martin Splitt "A short history of the web"
Martin Splitt "A short history of the web"Martin Splitt "A short history of the web"
Martin Splitt "A short history of the web"Fwdays
 
CouchDB: replicated data store for distributed proxy server
CouchDB: replicated data store for distributed proxy serverCouchDB: replicated data store for distributed proxy server
CouchDB: replicated data store for distributed proxy servertkramar
 
[SoftServe IT Academy] - JavaScript Storages
[SoftServe IT Academy] - JavaScript Storages[SoftServe IT Academy] - JavaScript Storages
[SoftServe IT Academy] - JavaScript StoragesIvan Matiishyn
 
JMeter performance and scalability in Moodle Montana Moot 2014
JMeter performance and scalability in Moodle Montana Moot 2014JMeter performance and scalability in Moodle Montana Moot 2014
JMeter performance and scalability in Moodle Montana Moot 2014moorejon
 
Presentation slam the server with jMeter
Presentation slam the server with jMeterPresentation slam the server with jMeter
Presentation slam the server with jMeterNestor Mata Cuthbert
 

What's hot (6)

Martin Splitt "A short history of the web"
Martin Splitt "A short history of the web"Martin Splitt "A short history of the web"
Martin Splitt "A short history of the web"
 
CouchDB: replicated data store for distributed proxy server
CouchDB: replicated data store for distributed proxy serverCouchDB: replicated data store for distributed proxy server
CouchDB: replicated data store for distributed proxy server
 
[SoftServe IT Academy] - JavaScript Storages
[SoftServe IT Academy] - JavaScript Storages[SoftServe IT Academy] - JavaScript Storages
[SoftServe IT Academy] - JavaScript Storages
 
JMeter performance and scalability in Moodle Montana Moot 2014
JMeter performance and scalability in Moodle Montana Moot 2014JMeter performance and scalability in Moodle Montana Moot 2014
JMeter performance and scalability in Moodle Montana Moot 2014
 
Presentation slam the server with jMeter
Presentation slam the server with jMeterPresentation slam the server with jMeter
Presentation slam the server with jMeter
 
Caching in WordPress
Caching in WordPressCaching in WordPress
Caching in WordPress
 

Viewers also liked

Western Art & Architecture Summer/Fall 2011
Western Art & Architecture Summer/Fall 2011Western Art & Architecture Summer/Fall 2011
Western Art & Architecture Summer/Fall 2011knphoto
 
Commercial Portfolio
Commercial PortfolioCommercial Portfolio
Commercial Portfolioknphoto
 
Cowboys & Indians Magazine
Cowboys & Indians MagazineCowboys & Indians Magazine
Cowboys & Indians Magazineknphoto
 
Cabin in Big Sky
Cabin in Big SkyCabin in Big Sky
Cabin in Big Skyknphoto
 
Log Home Living
Log Home LivingLog Home Living
Log Home Livingknphoto
 
What's new in Team Foundation Server 2013
What's new in Team Foundation Server 2013What's new in Team Foundation Server 2013
What's new in Team Foundation Server 2013Jozua Velle
 
Big Sky Journal HOME 2009
Big Sky Journal HOME 2009Big Sky Journal HOME 2009
Big Sky Journal HOME 2009knphoto
 
Residential Portfolio
Residential PortfolioResidential Portfolio
Residential Portfolioknphoto
 
Distributed scrum
Distributed scrumDistributed scrum
Distributed scrumJozua Velle
 
Looking at geo tagging
Looking at geo taggingLooking at geo tagging
Looking at geo taggingraamt
 
Enough with the Ninja Shit
Enough with the Ninja ShitEnough with the Ninja Shit
Enough with the Ninja ShitZubin Tiku
 
Bouwplaatsveiligheid
BouwplaatsveiligheidBouwplaatsveiligheid
Bouwplaatsveiligheidsmid_jan
 
GIORNO 12
GIORNO 12GIORNO 12
GIORNO 124246sud
 
giorno 6
giorno 6giorno 6
giorno 64246sud
 
Application Lifecycle Management with Team Foundation Server
Application Lifecycle Management with Team Foundation ServerApplication Lifecycle Management with Team Foundation Server
Application Lifecycle Management with Team Foundation ServerJozua Velle
 
giorno 5
giorno 5giorno 5
giorno 54246sud
 

Viewers also liked (20)

Western Art & Architecture Summer/Fall 2011
Western Art & Architecture Summer/Fall 2011Western Art & Architecture Summer/Fall 2011
Western Art & Architecture Summer/Fall 2011
 
Commercial Portfolio
Commercial PortfolioCommercial Portfolio
Commercial Portfolio
 
Cowboys & Indians Magazine
Cowboys & Indians MagazineCowboys & Indians Magazine
Cowboys & Indians Magazine
 
Cabin in Big Sky
Cabin in Big SkyCabin in Big Sky
Cabin in Big Sky
 
Log Home Living
Log Home LivingLog Home Living
Log Home Living
 
What's new in Team Foundation Server 2013
What's new in Team Foundation Server 2013What's new in Team Foundation Server 2013
What's new in Team Foundation Server 2013
 
Big Sky Journal HOME 2009
Big Sky Journal HOME 2009Big Sky Journal HOME 2009
Big Sky Journal HOME 2009
 
Residential Portfolio
Residential PortfolioResidential Portfolio
Residential Portfolio
 
Distributed scrum
Distributed scrumDistributed scrum
Distributed scrum
 
Brexit 24062016 jp
Brexit 24062016 jpBrexit 24062016 jp
Brexit 24062016 jp
 
Hecho relevante inkemia
Hecho relevante inkemiaHecho relevante inkemia
Hecho relevante inkemia
 
Looking at geo tagging
Looking at geo taggingLooking at geo tagging
Looking at geo tagging
 
DevOps
DevOpsDevOps
DevOps
 
BHV
BHVBHV
BHV
 
Enough with the Ninja Shit
Enough with the Ninja ShitEnough with the Ninja Shit
Enough with the Ninja Shit
 
Bouwplaatsveiligheid
BouwplaatsveiligheidBouwplaatsveiligheid
Bouwplaatsveiligheid
 
GIORNO 12
GIORNO 12GIORNO 12
GIORNO 12
 
giorno 6
giorno 6giorno 6
giorno 6
 
Application Lifecycle Management with Team Foundation Server
Application Lifecycle Management with Team Foundation ServerApplication Lifecycle Management with Team Foundation Server
Application Lifecycle Management with Team Foundation Server
 
giorno 5
giorno 5giorno 5
giorno 5
 

Similar to Caching for the Mobile Web and Macklemore's Thrift Shop

A Look at the Performance of SAP's Modern UIs
A Look at the Performance of SAP's Modern UIsA Look at the Performance of SAP's Modern UIs
A Look at the Performance of SAP's Modern UIsSascha Wenninger
 
Web performance optimization - MercadoLibre
Web performance optimization - MercadoLibreWeb performance optimization - MercadoLibre
Web performance optimization - MercadoLibrePablo Moretti
 
Website Performance
Website PerformanceWebsite Performance
Website PerformanceHugo Fonseca
 
Fine tuning Hybrid Mobile App
Fine tuning Hybrid Mobile AppFine tuning Hybrid Mobile App
Fine tuning Hybrid Mobile AppAllan Tan
 
Geographic Distribution for Global Web Application Performance
Geographic Distribution for Global Web Application PerformanceGeographic Distribution for Global Web Application Performance
Geographic Distribution for Global Web Application Performancekkjjkevin03
 
Web Performance in the Age of HTTP/2 - FEDay Conference, Guangzhou, China 19/...
Web Performance in the Age of HTTP/2 - FEDay Conference, Guangzhou, China 19/...Web Performance in the Age of HTTP/2 - FEDay Conference, Guangzhou, China 19/...
Web Performance in the Age of HTTP/2 - FEDay Conference, Guangzhou, China 19/...Holger Bartel
 
20 tips for website performance
20 tips for website performance20 tips for website performance
20 tips for website performanceAndrew Siemer
 
PrairieDevCon 2014 - Web Doesn't Mean Slow
PrairieDevCon 2014 -  Web Doesn't Mean SlowPrairieDevCon 2014 -  Web Doesn't Mean Slow
PrairieDevCon 2014 - Web Doesn't Mean Slowdmethvin
 
10 things you can do to speed up your web app today stir trek edition
10 things you can do to speed up your web app today   stir trek edition10 things you can do to speed up your web app today   stir trek edition
10 things you can do to speed up your web app today stir trek editionChris Love
 
Web performance optimization for modern web applications
Web performance optimization for modern web applicationsWeb performance optimization for modern web applications
Web performance optimization for modern web applicationsChris Love
 
Improving frontend performance
Improving frontend performanceImproving frontend performance
Improving frontend performanceSagar Desarda
 
Breaking the Speed Limit: Faster Websites Win
Breaking the Speed Limit: Faster Websites WinBreaking the Speed Limit: Faster Websites Win
Breaking the Speed Limit: Faster Websites WinJonathan Hochman
 
NGINX for Application Delivery & Acceleration
NGINX for Application Delivery & AccelerationNGINX for Application Delivery & Acceleration
NGINX for Application Delivery & AccelerationNGINX, Inc.
 
Site Speed Hacks: Open West 2015
Site Speed Hacks: Open West 2015Site Speed Hacks: Open West 2015
Site Speed Hacks: Open West 2015Dustin Nay
 
NU Web Steering Committee - Oct 11 - Web Performance
NU Web Steering Committee - Oct 11 - Web PerformanceNU Web Steering Committee - Oct 11 - Web Performance
NU Web Steering Committee - Oct 11 - Web PerformanceLee Roberson
 
Boston Web Performance Meetup: The Render Chain and You
Boston Web Performance Meetup: The Render Chain and YouBoston Web Performance Meetup: The Render Chain and You
Boston Web Performance Meetup: The Render Chain and Youmattringel
 
Make Drupal Run Fast - increase page load speed
Make Drupal Run Fast - increase page load speedMake Drupal Run Fast - increase page load speed
Make Drupal Run Fast - increase page load speedPromet Source
 
Drupal 7 performance and optimization
Drupal 7 performance and optimizationDrupal 7 performance and optimization
Drupal 7 performance and optimizationShafqat Hussain
 

Similar to Caching for the Mobile Web and Macklemore's Thrift Shop (20)

A Look at the Performance of SAP's Modern UIs
A Look at the Performance of SAP's Modern UIsA Look at the Performance of SAP's Modern UIs
A Look at the Performance of SAP's Modern UIs
 
Web performance optimization - MercadoLibre
Web performance optimization - MercadoLibreWeb performance optimization - MercadoLibre
Web performance optimization - MercadoLibre
 
Website Performance
Website PerformanceWebsite Performance
Website Performance
 
Fine tuning Hybrid Mobile App
Fine tuning Hybrid Mobile AppFine tuning Hybrid Mobile App
Fine tuning Hybrid Mobile App
 
Geographic Distribution for Global Web Application Performance
Geographic Distribution for Global Web Application PerformanceGeographic Distribution for Global Web Application Performance
Geographic Distribution for Global Web Application Performance
 
Web Performance in the Age of HTTP/2 - FEDay Conference, Guangzhou, China 19/...
Web Performance in the Age of HTTP/2 - FEDay Conference, Guangzhou, China 19/...Web Performance in the Age of HTTP/2 - FEDay Conference, Guangzhou, China 19/...
Web Performance in the Age of HTTP/2 - FEDay Conference, Guangzhou, China 19/...
 
20 tips for website performance
20 tips for website performance20 tips for website performance
20 tips for website performance
 
Web performance
Web performanceWeb performance
Web performance
 
PrairieDevCon 2014 - Web Doesn't Mean Slow
PrairieDevCon 2014 -  Web Doesn't Mean SlowPrairieDevCon 2014 -  Web Doesn't Mean Slow
PrairieDevCon 2014 - Web Doesn't Mean Slow
 
10 things you can do to speed up your web app today stir trek edition
10 things you can do to speed up your web app today   stir trek edition10 things you can do to speed up your web app today   stir trek edition
10 things you can do to speed up your web app today stir trek edition
 
Web performance optimization for modern web applications
Web performance optimization for modern web applicationsWeb performance optimization for modern web applications
Web performance optimization for modern web applications
 
Improving frontend performance
Improving frontend performanceImproving frontend performance
Improving frontend performance
 
Breaking the Speed Limit: Faster Websites Win
Breaking the Speed Limit: Faster Websites WinBreaking the Speed Limit: Faster Websites Win
Breaking the Speed Limit: Faster Websites Win
 
NGINX for Application Delivery & Acceleration
NGINX for Application Delivery & AccelerationNGINX for Application Delivery & Acceleration
NGINX for Application Delivery & Acceleration
 
Site Speed Hacks: Open West 2015
Site Speed Hacks: Open West 2015Site Speed Hacks: Open West 2015
Site Speed Hacks: Open West 2015
 
NU Web Steering Committee - Oct 11 - Web Performance
NU Web Steering Committee - Oct 11 - Web PerformanceNU Web Steering Committee - Oct 11 - Web Performance
NU Web Steering Committee - Oct 11 - Web Performance
 
Boston Web Performance Meetup: The Render Chain and You
Boston Web Performance Meetup: The Render Chain and YouBoston Web Performance Meetup: The Render Chain and You
Boston Web Performance Meetup: The Render Chain and You
 
Make Drupal Run Fast - increase page load speed
Make Drupal Run Fast - increase page load speedMake Drupal Run Fast - increase page load speed
Make Drupal Run Fast - increase page load speed
 
Drupal 7 performance and optimization
Drupal 7 performance and optimizationDrupal 7 performance and optimization
Drupal 7 performance and optimization
 
Web browser architecture.pptx
Web browser architecture.pptxWeb browser architecture.pptx
Web browser architecture.pptx
 

Recently uploaded

How we think about an advisor tech stack
How we think about an advisor tech stackHow we think about an advisor tech stack
How we think about an advisor tech stackSummit
 
Relationship Counselling: From Disjointed Features to Product-First Thinking ...
Relationship Counselling: From Disjointed Features to Product-First Thinking ...Relationship Counselling: From Disjointed Features to Product-First Thinking ...
Relationship Counselling: From Disjointed Features to Product-First Thinking ...Product School
 
Are Human-generated Demonstrations Necessary for In-context Learning?
Are Human-generated Demonstrations Necessary for In-context Learning?Are Human-generated Demonstrations Necessary for In-context Learning?
Are Human-generated Demonstrations Necessary for In-context Learning?MENGSAYLOEM1
 
The Future of Product, by Founder & CEO, Product School
The Future of Product, by Founder & CEO, Product SchoolThe Future of Product, by Founder & CEO, Product School
The Future of Product, by Founder & CEO, Product SchoolProduct School
 
Roundtable_-_API_Research__Testing_Tools.pdf
Roundtable_-_API_Research__Testing_Tools.pdfRoundtable_-_API_Research__Testing_Tools.pdf
Roundtable_-_API_Research__Testing_Tools.pdfMostafa Higazy
 
Enhancing Productivity and Insight A Tour of JDK Tools Progress Beyond Java 17
Enhancing Productivity and Insight  A Tour of JDK Tools Progress Beyond Java 17Enhancing Productivity and Insight  A Tour of JDK Tools Progress Beyond Java 17
Enhancing Productivity and Insight A Tour of JDK Tools Progress Beyond Java 17Ana-Maria Mihalceanu
 
Harnessing the Power of GenAI for Exceptional Product Outcomes by Booking.com...
Harnessing the Power of GenAI for Exceptional Product Outcomes by Booking.com...Harnessing the Power of GenAI for Exceptional Product Outcomes by Booking.com...
Harnessing the Power of GenAI for Exceptional Product Outcomes by Booking.com...Product School
 
"How we created an SRE team in Temabit as a part of FOZZY Group in conditions...
"How we created an SRE team in Temabit as a part of FOZZY Group in conditions..."How we created an SRE team in Temabit as a part of FOZZY Group in conditions...
"How we created an SRE team in Temabit as a part of FOZZY Group in conditions...Fwdays
 
Introducing the New FME Community Webinar - Feb 21, 2024 (2).pdf
Introducing the New FME Community Webinar - Feb 21, 2024 (2).pdfIntroducing the New FME Community Webinar - Feb 21, 2024 (2).pdf
Introducing the New FME Community Webinar - Feb 21, 2024 (2).pdfSafe Software
 
Leonis Insights: The State of AI (7 trends for 2023 and 7 predictions for 2024)
Leonis Insights: The State of AI (7 trends for 2023 and 7 predictions for 2024)Leonis Insights: The State of AI (7 trends for 2023 and 7 predictions for 2024)
Leonis Insights: The State of AI (7 trends for 2023 and 7 predictions for 2024)Jay Zhao
 
"The Transformative Power of AI and Open Challenges" by Dr. Manish Gupta, Google
"The Transformative Power of AI and Open Challenges" by Dr. Manish Gupta, Google"The Transformative Power of AI and Open Challenges" by Dr. Manish Gupta, Google
"The Transformative Power of AI and Open Challenges" by Dr. Manish Gupta, GoogleISPMAIndia
 
Building Bridges: Merging RPA Processes, UiPath Apps, and Data Service to bu...
Building Bridges:  Merging RPA Processes, UiPath Apps, and Data Service to bu...Building Bridges:  Merging RPA Processes, UiPath Apps, and Data Service to bu...
Building Bridges: Merging RPA Processes, UiPath Apps, and Data Service to bu...DianaGray10
 
Launching New Products In Companies Where It Matters Most by Product Director...
Launching New Products In Companies Where It Matters Most by Product Director...Launching New Products In Companies Where It Matters Most by Product Director...
Launching New Products In Companies Where It Matters Most by Product Director...Product School
 
Dev Dives: Leverage APIs and Gen AI to power automations for RPA and software...
Dev Dives: Leverage APIs and Gen AI to power automations for RPA and software...Dev Dives: Leverage APIs and Gen AI to power automations for RPA and software...
Dev Dives: Leverage APIs and Gen AI to power automations for RPA and software...UiPathCommunity
 
The Art of the Possible with Graph by Dr Jim Webber Neo4j.pptx
The Art of the Possible with Graph by Dr Jim Webber Neo4j.pptxThe Art of the Possible with Graph by Dr Jim Webber Neo4j.pptx
The Art of the Possible with Graph by Dr Jim Webber Neo4j.pptxNeo4j
 
How to write an effective Cyber Incident Response Plan
How to write an effective Cyber Incident Response PlanHow to write an effective Cyber Incident Response Plan
How to write an effective Cyber Incident Response PlanDatabarracks
 
Act Like an Owner, Challenge Like a VC by former CPO, Tripadvisor
Act Like an Owner,  Challenge Like a VC by former CPO, TripadvisorAct Like an Owner,  Challenge Like a VC by former CPO, Tripadvisor
Act Like an Owner, Challenge Like a VC by former CPO, TripadvisorProduct School
 
Introduction to Multimodal LLMs with LLaVA
Introduction to Multimodal LLMs with LLaVAIntroduction to Multimodal LLMs with LLaVA
Introduction to Multimodal LLMs with LLaVARobert McDermott
 
IT Nation Evolve event 2024 - Quarter 1
IT Nation Evolve event 2024  - Quarter 1IT Nation Evolve event 2024  - Quarter 1
IT Nation Evolve event 2024 - Quarter 1Inbay UK
 

Recently uploaded (20)

How we think about an advisor tech stack
How we think about an advisor tech stackHow we think about an advisor tech stack
How we think about an advisor tech stack
 
Relationship Counselling: From Disjointed Features to Product-First Thinking ...
Relationship Counselling: From Disjointed Features to Product-First Thinking ...Relationship Counselling: From Disjointed Features to Product-First Thinking ...
Relationship Counselling: From Disjointed Features to Product-First Thinking ...
 
Are Human-generated Demonstrations Necessary for In-context Learning?
Are Human-generated Demonstrations Necessary for In-context Learning?Are Human-generated Demonstrations Necessary for In-context Learning?
Are Human-generated Demonstrations Necessary for In-context Learning?
 
The Future of Product, by Founder & CEO, Product School
The Future of Product, by Founder & CEO, Product SchoolThe Future of Product, by Founder & CEO, Product School
The Future of Product, by Founder & CEO, Product School
 
Roundtable_-_API_Research__Testing_Tools.pdf
Roundtable_-_API_Research__Testing_Tools.pdfRoundtable_-_API_Research__Testing_Tools.pdf
Roundtable_-_API_Research__Testing_Tools.pdf
 
Enhancing Productivity and Insight A Tour of JDK Tools Progress Beyond Java 17
Enhancing Productivity and Insight  A Tour of JDK Tools Progress Beyond Java 17Enhancing Productivity and Insight  A Tour of JDK Tools Progress Beyond Java 17
Enhancing Productivity and Insight A Tour of JDK Tools Progress Beyond Java 17
 
Harnessing the Power of GenAI for Exceptional Product Outcomes by Booking.com...
Harnessing the Power of GenAI for Exceptional Product Outcomes by Booking.com...Harnessing the Power of GenAI for Exceptional Product Outcomes by Booking.com...
Harnessing the Power of GenAI for Exceptional Product Outcomes by Booking.com...
 
In sharing we trust. Taking advantage of a diverse consortium to build a tran...
In sharing we trust. Taking advantage of a diverse consortium to build a tran...In sharing we trust. Taking advantage of a diverse consortium to build a tran...
In sharing we trust. Taking advantage of a diverse consortium to build a tran...
 
"How we created an SRE team in Temabit as a part of FOZZY Group in conditions...
"How we created an SRE team in Temabit as a part of FOZZY Group in conditions..."How we created an SRE team in Temabit as a part of FOZZY Group in conditions...
"How we created an SRE team in Temabit as a part of FOZZY Group in conditions...
 
Introducing the New FME Community Webinar - Feb 21, 2024 (2).pdf
Introducing the New FME Community Webinar - Feb 21, 2024 (2).pdfIntroducing the New FME Community Webinar - Feb 21, 2024 (2).pdf
Introducing the New FME Community Webinar - Feb 21, 2024 (2).pdf
 
Leonis Insights: The State of AI (7 trends for 2023 and 7 predictions for 2024)
Leonis Insights: The State of AI (7 trends for 2023 and 7 predictions for 2024)Leonis Insights: The State of AI (7 trends for 2023 and 7 predictions for 2024)
Leonis Insights: The State of AI (7 trends for 2023 and 7 predictions for 2024)
 
"The Transformative Power of AI and Open Challenges" by Dr. Manish Gupta, Google
"The Transformative Power of AI and Open Challenges" by Dr. Manish Gupta, Google"The Transformative Power of AI and Open Challenges" by Dr. Manish Gupta, Google
"The Transformative Power of AI and Open Challenges" by Dr. Manish Gupta, Google
 
Building Bridges: Merging RPA Processes, UiPath Apps, and Data Service to bu...
Building Bridges:  Merging RPA Processes, UiPath Apps, and Data Service to bu...Building Bridges:  Merging RPA Processes, UiPath Apps, and Data Service to bu...
Building Bridges: Merging RPA Processes, UiPath Apps, and Data Service to bu...
 
Launching New Products In Companies Where It Matters Most by Product Director...
Launching New Products In Companies Where It Matters Most by Product Director...Launching New Products In Companies Where It Matters Most by Product Director...
Launching New Products In Companies Where It Matters Most by Product Director...
 
Dev Dives: Leverage APIs and Gen AI to power automations for RPA and software...
Dev Dives: Leverage APIs and Gen AI to power automations for RPA and software...Dev Dives: Leverage APIs and Gen AI to power automations for RPA and software...
Dev Dives: Leverage APIs and Gen AI to power automations for RPA and software...
 
The Art of the Possible with Graph by Dr Jim Webber Neo4j.pptx
The Art of the Possible with Graph by Dr Jim Webber Neo4j.pptxThe Art of the Possible with Graph by Dr Jim Webber Neo4j.pptx
The Art of the Possible with Graph by Dr Jim Webber Neo4j.pptx
 
How to write an effective Cyber Incident Response Plan
How to write an effective Cyber Incident Response PlanHow to write an effective Cyber Incident Response Plan
How to write an effective Cyber Incident Response Plan
 
Act Like an Owner, Challenge Like a VC by former CPO, Tripadvisor
Act Like an Owner,  Challenge Like a VC by former CPO, TripadvisorAct Like an Owner,  Challenge Like a VC by former CPO, Tripadvisor
Act Like an Owner, Challenge Like a VC by former CPO, Tripadvisor
 
Introduction to Multimodal LLMs with LLaVA
Introduction to Multimodal LLMs with LLaVAIntroduction to Multimodal LLMs with LLaVA
Introduction to Multimodal LLMs with LLaVA
 
IT Nation Evolve event 2024 - Quarter 1
IT Nation Evolve event 2024  - Quarter 1IT Nation Evolve event 2024  - Quarter 1
IT Nation Evolve event 2024 - Quarter 1
 

Caching for the Mobile Web and Macklemore's Thrift Shop

  • 1. Caching for the Mobile Web and Macklemore's Thrift Shop by @rubikzube
  • 2. Sometimes I make poor decisions
  • 3. The rest of the time ● I work on shutterstock.mobi ● Eventually needs to handle 100k visits per day around the world ● Uses a handful of web servers ● That means serious caching
  • 4. Caching means better performance for users and servers 1. Make fewer requests 2. Fetch smaller resources 3. Travel shorter distances 4. Use generic pages that are cacheable Don’t kill the servers Do serve fast pages
  • 5. Start by hunting for easy wins ● Use yslow and pagespeed to find ways to make fewer requests and to fetch smaller resources ● Try to score in the high 80s - low 90s ● Minifying, concatenating, and gzipping is only the first step I’m, I’m hunting, looking for a come up, this is f*cking awesome
  • 6. HTTP basics are important too ● HTTP is a core protocol of the internet ● HTTP headers determine how content will be cached on the browser AND along the network ● If HTTP headers are set properly the browser will travel shorter distances Imma take your grandpa’s style
  • 7. Caching involves more than a browser and a server Reverse Proxies Web Servers Wireless Towers Optional CDNs Internet Routers Mobile Device w/ Radio Web Browser billions millions 100’s 100k’s a few handfula few Peep game, come take a look through my telescope
  • 8. If headers are set correctly, the network serves the pages This isn’t a beer or basketball Less hops is better Reverse Proxies Web Servers Wireless Towers Optional CDNs Internet Routers Mobile Device w/ Radio Web Browser billions millions 100’s 100k’s a few handfula few
  • 9. A brief example ● Cache-Control: public, max-age=31536000 ● Date: Tue, 17 Sep 2013 01:59:24 GMT ● Expires: Wed, 17 Sep 2014 01:59:24 GMT ● Server: nginx ● ETag: "151472-1379361363000" Savin' my money and I'm hella happy that's a bargain, b*tch
  • 10. Keep pages generic where possible ● Separate user-specific content from public pages at the request level to make pages generic and cacheable Dressed in all pink except my gator shoes, those are green
  • 12. The overall effect Generic pages loaded from the network. User-specific content follows from the web server via AJAX. Reverse Proxies Web Servers Wireless Towers Optional CDNs Internet Routers Mobile Device w/ Radio Web Browser billions millions 100’s 100k’s a few handfula few
  • 13. ● Any request caches generic pages in the network, creating a pull effect ● The more users there are, the faster the site appears to respond ● For layering in user-specific content via AJAX ○ Use different domains ○ Use the same domain and scope user-specific content (and cookies) to a subdirectory More generic pages means more caching
  • 14. Don’t send cookies with generic pages. EVER. ● Sending cookies with generic pages signals that the response is not generic and should not be cached Having the same one as six other people in this club is a hella don’t
  • 15. Everyone go visit TMZ right now Raise your hand if you can identify why it’s slow in this diagram Reverse Proxies Web Servers Wireless Towers Optional CDNs Internet Routers Mobile Device w/ Radio Web Browser billions millions 100’s 100k’s a few handfula few
  • 16. If the first page load is slow in the the forest, and no one is around ● On first page load, there are too many variations in mobile network connectivity to perceive whether the site itself is slow ● I submit don’t optimize the first page load ● I submit the most important page load is the second What you know about rockin' a wolf on your noggin? What you knowin' about wearin' a fur fox skin?
  • 17. Optimize for the second load ● Serve all JS/CSS/Icons for the site on every page with a year-long cache expiry ● First Load: 297.3K 16 requests ● Homepage: 7.7K 1 request ● Login: 5.4K 1 request ● Search: 28.0K 1 request + images As for performance impact: Browsers get better all the time, the network doesn’t
  • 18. Questions? Special shout out to @ShutterTech! Keepin’ me honest since 2011