SlideShare a Scribd company logo
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
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
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
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
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
Generic
User-Specific
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
● 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
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
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
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?
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
Questions?
Special shout out to @ShutterTech!
Keepin’ me honest since 2011

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 server
tkramar
 
[SoftServe IT Academy] - JavaScript Storages
[SoftServe IT Academy] - JavaScript Storages[SoftServe IT Academy] - JavaScript Storages
[SoftServe IT Academy] - JavaScript Storages
Ivan 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 2014
moorejon
 
Presentation slam the server with jMeter
Presentation slam the server with jMeterPresentation slam the server with jMeter
Presentation slam the server with jMeter
Nestor Mata Cuthbert
 
Caching in WordPress
Caching in WordPressCaching in WordPress
Caching in WordPress
David Biňovec
 

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 2011
knphoto
 
Commercial Portfolio
Commercial PortfolioCommercial Portfolio
Commercial Portfolio
knphoto
 
Cowboys & Indians Magazine
Cowboys & Indians MagazineCowboys & Indians Magazine
Cowboys & Indians Magazine
knphoto
 
Cabin in Big Sky
Cabin in Big SkyCabin in Big Sky
Cabin in Big Sky
knphoto
 
Log Home Living
Log Home LivingLog Home Living
Log Home Living
knphoto
 
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
Jozua Velle
 
Big Sky Journal HOME 2009
Big Sky Journal HOME 2009Big Sky Journal HOME 2009
Big Sky Journal HOME 2009
knphoto
 
Residential Portfolio
Residential PortfolioResidential Portfolio
Residential Portfolio
knphoto
 
Distributed scrum
Distributed scrumDistributed scrum
Distributed scrum
Jozua Velle
 
Brexit 24062016 jp
Brexit 24062016 jpBrexit 24062016 jp
Hecho relevante inkemia
Hecho relevante inkemiaHecho relevante inkemia
Hecho relevante inkemia
WEB FINANCIAL GROUP INTERNATIONAL SL
 
Looking at geo tagging
Looking at geo taggingLooking at geo tagging
Looking at geo tagging
raamt
 
DevOps
DevOpsDevOps
DevOps
Jozua Velle
 
Enough with the Ninja Shit
Enough with the Ninja ShitEnough with the Ninja Shit
Enough with the Ninja Shit
Zubin Tiku
 
Bouwplaatsveiligheid
BouwplaatsveiligheidBouwplaatsveiligheid
Bouwplaatsveiligheid
smid_jan
 
GIORNO 12
GIORNO 12GIORNO 12
GIORNO 12
4246sud
 
giorno 6
giorno 6giorno 6
giorno 6
4246sud
 
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
Jozua Velle
 
giorno 5
giorno 5giorno 5
giorno 5
4246sud
 

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 UIs
Sascha Wenninger
 
Web performance optimization - MercadoLibre
Web performance optimization - MercadoLibreWeb performance optimization - MercadoLibre
Web performance optimization - MercadoLibre
Pablo Moretti
 
Website Performance
Website PerformanceWebsite Performance
Website Performance
Hugo Fonseca
 
Fine tuning Hybrid Mobile App
Fine tuning Hybrid Mobile AppFine tuning Hybrid Mobile App
Fine tuning Hybrid Mobile App
Allan 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 Performance
kkjjkevin03
 
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 performance
Andrew Siemer
 
Web performance
Web performanceWeb performance
Web performance
kareem zock
 
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
dmethvin
 
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
Chris 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 applications
Chris Love
 
Improving frontend performance
Improving frontend performanceImproving frontend performance
Improving frontend performance
Sagar 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 Win
Jonathan Hochman
 
Guide 4 - How To Dramatically Speed Up Your Website Using A Caching Plugin.pdf
Guide 4 - How To Dramatically Speed Up Your Website Using A Caching Plugin.pdfGuide 4 - How To Dramatically Speed Up Your Website Using A Caching Plugin.pdf
Guide 4 - How To Dramatically Speed Up Your Website Using A Caching Plugin.pdf
persuebusiness
 
NGINX for Application Delivery & Acceleration
NGINX for Application Delivery & AccelerationNGINX for Application Delivery & Acceleration
NGINX for Application Delivery & Acceleration
NGINX, Inc.
 
Site Speed Hacks: Open West 2015
Site Speed Hacks: Open West 2015Site Speed Hacks: Open West 2015
Site Speed Hacks: Open West 2015
Dustin Nay
 
Large-Scale Web Scraping: An Ultimate Guide
Large-Scale Web Scraping: An Ultimate GuideLarge-Scale Web Scraping: An Ultimate Guide
Large-Scale Web Scraping: An Ultimate Guide
Data Scraping and Data Extraction
 
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
Lee 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 You
mattringel
 
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
Promet Source
 

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
 
Guide 4 - How To Dramatically Speed Up Your Website Using A Caching Plugin.pdf
Guide 4 - How To Dramatically Speed Up Your Website Using A Caching Plugin.pdfGuide 4 - How To Dramatically Speed Up Your Website Using A Caching Plugin.pdf
Guide 4 - How To Dramatically Speed Up Your Website Using A Caching Plugin.pdf
 
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
 
Large-Scale Web Scraping: An Ultimate Guide
Large-Scale Web Scraping: An Ultimate GuideLarge-Scale Web Scraping: An Ultimate Guide
Large-Scale Web Scraping: An Ultimate Guide
 
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
 

Recently uploaded

Step-By-Step Process to Develop a Mobile App From Scratch
Step-By-Step Process to Develop a Mobile App From ScratchStep-By-Step Process to Develop a Mobile App From Scratch
Step-By-Step Process to Develop a Mobile App From Scratch
softsuave
 
July Patch Tuesday
July Patch TuesdayJuly Patch Tuesday
July Patch Tuesday
Ivanti
 
IPLOOK Remote-Sensing Satellite Solution
IPLOOK Remote-Sensing Satellite SolutionIPLOOK Remote-Sensing Satellite Solution
IPLOOK Remote-Sensing Satellite Solution
IPLOOK Networks
 
Introduction-to-the-IAM-Platform-Implementation-Plan.pptx
Introduction-to-the-IAM-Platform-Implementation-Plan.pptxIntroduction-to-the-IAM-Platform-Implementation-Plan.pptx
Introduction-to-the-IAM-Platform-Implementation-Plan.pptx
313mohammedarshad
 
Evolution of iPaaS - simplify IT workloads to provide a unified view of data...
Evolution of iPaaS - simplify IT workloads to provide a unified view of  data...Evolution of iPaaS - simplify IT workloads to provide a unified view of  data...
Evolution of iPaaS - simplify IT workloads to provide a unified view of data...
Torry Harris
 
MAKE MONEY ONLINE Unlock Your Income Potential Today.pptx
MAKE MONEY ONLINE Unlock Your Income Potential Today.pptxMAKE MONEY ONLINE Unlock Your Income Potential Today.pptx
MAKE MONEY ONLINE Unlock Your Income Potential Today.pptx
janagijoythi
 
Patch Tuesday de julio
Patch Tuesday de julioPatch Tuesday de julio
Patch Tuesday de julio
Ivanti
 
(CISOPlatform Summit & SACON 2024) Keynote _ Power Digital Identities With AI...
(CISOPlatform Summit & SACON 2024) Keynote _ Power Digital Identities With AI...(CISOPlatform Summit & SACON 2024) Keynote _ Power Digital Identities With AI...
(CISOPlatform Summit & SACON 2024) Keynote _ Power Digital Identities With AI...
Priyanka Aash
 
(CISOPlatform Summit & SACON 2024) Gen AI & Deepfake In Overall Security.pdf
(CISOPlatform Summit & SACON 2024) Gen AI & Deepfake In Overall Security.pdf(CISOPlatform Summit & SACON 2024) Gen AI & Deepfake In Overall Security.pdf
(CISOPlatform Summit & SACON 2024) Gen AI & Deepfake In Overall Security.pdf
Priyanka Aash
 
Mule Experience Hub and Release Channel with Java 17
Mule Experience Hub and Release Channel with Java 17Mule Experience Hub and Release Channel with Java 17
Mule Experience Hub and Release Channel with Java 17
Bhajan Mehta
 
Google I/O Extended Harare Merged Slides
Google I/O Extended Harare Merged SlidesGoogle I/O Extended Harare Merged Slides
Google I/O Extended Harare Merged Slides
Google Developer Group - Harare
 
Vulnerability Management: A Comprehensive Overview
Vulnerability Management: A Comprehensive OverviewVulnerability Management: A Comprehensive Overview
Vulnerability Management: A Comprehensive Overview
Steven Carlson
 
Data Integration Basics: Merging & Joining Data
Data Integration Basics: Merging & Joining DataData Integration Basics: Merging & Joining Data
Data Integration Basics: Merging & Joining Data
Safe Software
 
BLOCKCHAIN TECHNOLOGY - Advantages and Disadvantages
BLOCKCHAIN TECHNOLOGY - Advantages and DisadvantagesBLOCKCHAIN TECHNOLOGY - Advantages and Disadvantages
BLOCKCHAIN TECHNOLOGY - Advantages and Disadvantages
SAI KAILASH R
 
Girls call Kolkata 👀 XXXXXXXXXXX 👀 Rs.9.5 K Cash Payment With Room Delivery
Girls call Kolkata 👀 XXXXXXXXXXX 👀 Rs.9.5 K Cash Payment With Room Delivery Girls call Kolkata 👀 XXXXXXXXXXX 👀 Rs.9.5 K Cash Payment With Room Delivery
Girls call Kolkata 👀 XXXXXXXXXXX 👀 Rs.9.5 K Cash Payment With Room Delivery
sunilverma7884
 
Tailored CRM Software Development for Enhanced Customer Insights
Tailored CRM Software Development for Enhanced Customer InsightsTailored CRM Software Development for Enhanced Customer Insights
Tailored CRM Software Development for Enhanced Customer Insights
SynapseIndia
 
Mastering OnlyFans Clone App Development: Key Strategies for Success
Mastering OnlyFans Clone App Development: Key Strategies for SuccessMastering OnlyFans Clone App Development: Key Strategies for Success
Mastering OnlyFans Clone App Development: Key Strategies for Success
David Wilson
 
Computer HARDWARE presenattion by CWD students class 10
Computer HARDWARE presenattion by CWD students class 10Computer HARDWARE presenattion by CWD students class 10
Computer HARDWARE presenattion by CWD students class 10
ankush9927
 
Types of Weaving loom machine & it's technology
Types of Weaving loom machine & it's technologyTypes of Weaving loom machine & it's technology
Types of Weaving loom machine & it's technology
ldtexsolbl
 
leewayhertz.com-Generative AI tech stack Frameworks infrastructure models and...
leewayhertz.com-Generative AI tech stack Frameworks infrastructure models and...leewayhertz.com-Generative AI tech stack Frameworks infrastructure models and...
leewayhertz.com-Generative AI tech stack Frameworks infrastructure models and...
alexjohnson7307
 

Recently uploaded (20)

Step-By-Step Process to Develop a Mobile App From Scratch
Step-By-Step Process to Develop a Mobile App From ScratchStep-By-Step Process to Develop a Mobile App From Scratch
Step-By-Step Process to Develop a Mobile App From Scratch
 
July Patch Tuesday
July Patch TuesdayJuly Patch Tuesday
July Patch Tuesday
 
IPLOOK Remote-Sensing Satellite Solution
IPLOOK Remote-Sensing Satellite SolutionIPLOOK Remote-Sensing Satellite Solution
IPLOOK Remote-Sensing Satellite Solution
 
Introduction-to-the-IAM-Platform-Implementation-Plan.pptx
Introduction-to-the-IAM-Platform-Implementation-Plan.pptxIntroduction-to-the-IAM-Platform-Implementation-Plan.pptx
Introduction-to-the-IAM-Platform-Implementation-Plan.pptx
 
Evolution of iPaaS - simplify IT workloads to provide a unified view of data...
Evolution of iPaaS - simplify IT workloads to provide a unified view of  data...Evolution of iPaaS - simplify IT workloads to provide a unified view of  data...
Evolution of iPaaS - simplify IT workloads to provide a unified view of data...
 
MAKE MONEY ONLINE Unlock Your Income Potential Today.pptx
MAKE MONEY ONLINE Unlock Your Income Potential Today.pptxMAKE MONEY ONLINE Unlock Your Income Potential Today.pptx
MAKE MONEY ONLINE Unlock Your Income Potential Today.pptx
 
Patch Tuesday de julio
Patch Tuesday de julioPatch Tuesday de julio
Patch Tuesday de julio
 
(CISOPlatform Summit & SACON 2024) Keynote _ Power Digital Identities With AI...
(CISOPlatform Summit & SACON 2024) Keynote _ Power Digital Identities With AI...(CISOPlatform Summit & SACON 2024) Keynote _ Power Digital Identities With AI...
(CISOPlatform Summit & SACON 2024) Keynote _ Power Digital Identities With AI...
 
(CISOPlatform Summit & SACON 2024) Gen AI & Deepfake In Overall Security.pdf
(CISOPlatform Summit & SACON 2024) Gen AI & Deepfake In Overall Security.pdf(CISOPlatform Summit & SACON 2024) Gen AI & Deepfake In Overall Security.pdf
(CISOPlatform Summit & SACON 2024) Gen AI & Deepfake In Overall Security.pdf
 
Mule Experience Hub and Release Channel with Java 17
Mule Experience Hub and Release Channel with Java 17Mule Experience Hub and Release Channel with Java 17
Mule Experience Hub and Release Channel with Java 17
 
Google I/O Extended Harare Merged Slides
Google I/O Extended Harare Merged SlidesGoogle I/O Extended Harare Merged Slides
Google I/O Extended Harare Merged Slides
 
Vulnerability Management: A Comprehensive Overview
Vulnerability Management: A Comprehensive OverviewVulnerability Management: A Comprehensive Overview
Vulnerability Management: A Comprehensive Overview
 
Data Integration Basics: Merging & Joining Data
Data Integration Basics: Merging & Joining DataData Integration Basics: Merging & Joining Data
Data Integration Basics: Merging & Joining Data
 
BLOCKCHAIN TECHNOLOGY - Advantages and Disadvantages
BLOCKCHAIN TECHNOLOGY - Advantages and DisadvantagesBLOCKCHAIN TECHNOLOGY - Advantages and Disadvantages
BLOCKCHAIN TECHNOLOGY - Advantages and Disadvantages
 
Girls call Kolkata 👀 XXXXXXXXXXX 👀 Rs.9.5 K Cash Payment With Room Delivery
Girls call Kolkata 👀 XXXXXXXXXXX 👀 Rs.9.5 K Cash Payment With Room Delivery Girls call Kolkata 👀 XXXXXXXXXXX 👀 Rs.9.5 K Cash Payment With Room Delivery
Girls call Kolkata 👀 XXXXXXXXXXX 👀 Rs.9.5 K Cash Payment With Room Delivery
 
Tailored CRM Software Development for Enhanced Customer Insights
Tailored CRM Software Development for Enhanced Customer InsightsTailored CRM Software Development for Enhanced Customer Insights
Tailored CRM Software Development for Enhanced Customer Insights
 
Mastering OnlyFans Clone App Development: Key Strategies for Success
Mastering OnlyFans Clone App Development: Key Strategies for SuccessMastering OnlyFans Clone App Development: Key Strategies for Success
Mastering OnlyFans Clone App Development: Key Strategies for Success
 
Computer HARDWARE presenattion by CWD students class 10
Computer HARDWARE presenattion by CWD students class 10Computer HARDWARE presenattion by CWD students class 10
Computer HARDWARE presenattion by CWD students class 10
 
Types of Weaving loom machine & it's technology
Types of Weaving loom machine & it's technologyTypes of Weaving loom machine & it's technology
Types of Weaving loom machine & it's technology
 
leewayhertz.com-Generative AI tech stack Frameworks infrastructure models and...
leewayhertz.com-Generative AI tech stack Frameworks infrastructure models and...leewayhertz.com-Generative AI tech stack Frameworks infrastructure models and...
leewayhertz.com-Generative AI tech stack Frameworks infrastructure models and...
 

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