SlideShare une entreprise Scribd logo
1  sur  19
Performance web
optimizations
Optimizations
First page load
Repeated page load
Importance
1. Sequences/Blockers
2. HTML
3. CSS
4. Images
5. JavaScript
6. Headers
7. Fonts
8. Tracking resources
Before start
Measure!
Making sure you’re optimizing
Can brag later
Find bottlenecks
HTML
PHP response time
DB calls
Network calls
HHVM
PHPNG (PHP-7)
Nginx cache (without Set-Cookie ;) )
No redirects
Aug 2014
HTML
Delete unnecessary
No HTML comments (except conditional)
Minify (careful with new lines)
Optimize size (1 roundtrip = 14KB)
CSS
Minify
Optimize selectors (avoid duplicate resource load)
Remove not needed
Inline if(“we optimize for first load” && “it’s not too big”)
Minimize requests count if(“one request is not too big”)
JavaScript
Minify
Use single, async file if possible
Don’t count on it for rendering the page
Make sure you’re optimizing with late-
loading
Gzip
Gzip level ~6
Gzip static
Build foo.js to foo.js.gz and bar.css to bar.css.gz in build time
Headers
HTML:
Cache-Control:no-store, no-cache, must-revalidate, post-check=0, pre-check=0
CSS, JS, Images, fonts
Cache-Control:max-age=604800
Date:Mon, 12 Jan 2015 16:23:25 GMT
ETag:"54aa848a-1609d"
Expires:Mon, 19 Jan 2015 16:23:25 GMT
Last-Modified:Mon, 05 Jan 2015 12:33:14 GMT
Images
Optimize file size
Use progressive rendering
Use sprites when possible
Use Base64 (don’t shoot yourself)
Use responsive design
Specify image dimensions if possible
Check for duplicates
Fonts
No custom fonts if possible (fight to the last drop of blood)
Light fonts if possible (zh)
Sequences
DNS lookup
HTML size
Blocking CSS
Blocking JS
Concurrent downloading (~100KB max)
CDN
Check for blocking DNS lookups
If CSS is inline change the
relative paths to absolute
After finish
Measure
Find bottlenecks
Find imperfections
No imperfections ? “brag” : “optimize again”
Examples
Tools
http://www.monitis.com/pageload/
http://gtmetrix.com/
http://www.webpagetest.org/
https://developers.google.com/speed/pagespeed/insights/
Chrome audit
Thank you!

Contenu connexe

Tendances

WordCamp RVA 2011 - Performance & Tuning
WordCamp RVA 2011 - Performance & TuningWordCamp RVA 2011 - Performance & Tuning
WordCamp RVA 2011 - Performance & TuningTimothy Wood
 
How to speed up your website
How to speed up your websiteHow to speed up your website
How to speed up your websiteVernalWeb
 
Rencore Webinar: Developing Secure and Performant JavaScript for SharePoint
Rencore Webinar: Developing Secure and Performant JavaScript for SharePointRencore Webinar: Developing Secure and Performant JavaScript for SharePoint
Rencore Webinar: Developing Secure and Performant JavaScript for SharePointRencore
 
Web Performance Part 3 "Server-side tips"
Web Performance Part 3  "Server-side tips"Web Performance Part 3  "Server-side tips"
Web Performance Part 3 "Server-side tips"Binary Studio
 
Fine tuning Hybrid Mobile App
Fine tuning Hybrid Mobile AppFine tuning Hybrid Mobile App
Fine tuning Hybrid Mobile AppAllan Tan
 
Extreme Javascript Minification
Extreme Javascript MinificationExtreme Javascript Minification
Extreme Javascript MinificationDavid Goemans
 
About Caching
About CachingAbout Caching
About CachingWeng Wei
 
Web Optimization Level: Paranoid
Web Optimization Level: ParanoidWeb Optimization Level: Paranoid
Web Optimization Level: Paranoidrobin_sy
 
Level Up: 5 Expert Tips for Optimizing WordPress Performance
Level Up: 5 Expert Tips for Optimizing WordPress PerformanceLevel Up: 5 Expert Tips for Optimizing WordPress Performance
Level Up: 5 Expert Tips for Optimizing WordPress PerformancePantheon
 
High Performance - Joomla!Days NL 2009 #jd09nl
High Performance - Joomla!Days NL 2009 #jd09nlHigh Performance - Joomla!Days NL 2009 #jd09nl
High Performance - Joomla!Days NL 2009 #jd09nlJoomla!Days Netherlands
 
Optimizing Your Site
Optimizing Your SiteOptimizing Your Site
Optimizing Your Sitertvenge
 
Something about node basics
Something about node basicsSomething about node basics
Something about node basicsPhilipp Fehre
 
Browserscope oscon 2011
Browserscope oscon 2011Browserscope oscon 2011
Browserscope oscon 2011lsimon
 
Go With The Reflow
Go With The ReflowGo With The Reflow
Go With The Reflowlsimon
 
Client Side Optimization
Client Side OptimizationClient Side Optimization
Client Side OptimizationPatrick Huesler
 
High Performance WordPress II
High Performance WordPress IIHigh Performance WordPress II
High Performance WordPress IIBarry Abrahamson
 

Tendances (17)

WordCamp RVA 2011 - Performance & Tuning
WordCamp RVA 2011 - Performance & TuningWordCamp RVA 2011 - Performance & Tuning
WordCamp RVA 2011 - Performance & Tuning
 
How to speed up your website
How to speed up your websiteHow to speed up your website
How to speed up your website
 
Rencore Webinar: Developing Secure and Performant JavaScript for SharePoint
Rencore Webinar: Developing Secure and Performant JavaScript for SharePointRencore Webinar: Developing Secure and Performant JavaScript for SharePoint
Rencore Webinar: Developing Secure and Performant JavaScript for SharePoint
 
Web Performance Part 3 "Server-side tips"
Web Performance Part 3  "Server-side tips"Web Performance Part 3  "Server-side tips"
Web Performance Part 3 "Server-side tips"
 
Fine tuning Hybrid Mobile App
Fine tuning Hybrid Mobile AppFine tuning Hybrid Mobile App
Fine tuning Hybrid Mobile App
 
Extreme Javascript Minification
Extreme Javascript MinificationExtreme Javascript Minification
Extreme Javascript Minification
 
About Caching
About CachingAbout Caching
About Caching
 
Web Optimization Level: Paranoid
Web Optimization Level: ParanoidWeb Optimization Level: Paranoid
Web Optimization Level: Paranoid
 
Level Up: 5 Expert Tips for Optimizing WordPress Performance
Level Up: 5 Expert Tips for Optimizing WordPress PerformanceLevel Up: 5 Expert Tips for Optimizing WordPress Performance
Level Up: 5 Expert Tips for Optimizing WordPress Performance
 
High Performance - Joomla!Days NL 2009 #jd09nl
High Performance - Joomla!Days NL 2009 #jd09nlHigh Performance - Joomla!Days NL 2009 #jd09nl
High Performance - Joomla!Days NL 2009 #jd09nl
 
Optimizing Your Site
Optimizing Your SiteOptimizing Your Site
Optimizing Your Site
 
Something about node basics
Something about node basicsSomething about node basics
Something about node basics
 
Browserscope oscon 2011
Browserscope oscon 2011Browserscope oscon 2011
Browserscope oscon 2011
 
Go With The Reflow
Go With The ReflowGo With The Reflow
Go With The Reflow
 
Client Side Optimization
Client Side OptimizationClient Side Optimization
Client Side Optimization
 
Presentation1
Presentation1Presentation1
Presentation1
 
High Performance WordPress II
High Performance WordPress IIHigh Performance WordPress II
High Performance WordPress II
 

En vedette

Guión de-observación segunda practica lep
Guión de-observación segunda practica lepGuión de-observación segunda practica lep
Guión de-observación segunda practica leplizbeth Bernal Morales
 
粒子系統 Particle system
粒子系統 Particle system粒子系統 Particle system
粒子系統 Particle systemPower Wu
 
Escuela preparatoria-oficial-anexa-a-la-normal-de
Escuela preparatoria-oficial-anexa-a-la-normal-deEscuela preparatoria-oficial-anexa-a-la-normal-de
Escuela preparatoria-oficial-anexa-a-la-normal-deDaniel Tinoco Moreno
 
situación de aprendizaje del campo de pensamiento matematico integrando un so...
situación de aprendizaje del campo de pensamiento matematico integrando un so...situación de aprendizaje del campo de pensamiento matematico integrando un so...
situación de aprendizaje del campo de pensamiento matematico integrando un so...lizbeth Bernal Morales
 
物聯網技術分享 使用ESP8266
物聯網技術分享 使用ESP8266物聯網技術分享 使用ESP8266
物聯網技術分享 使用ESP8266Power Wu
 

En vedette (13)

Guión de-observación segunda practica lep
Guión de-observación segunda practica lepGuión de-observación segunda practica lep
Guión de-observación segunda practica lep
 
Gomez ramos jhenifer examen final
Gomez ramos jhenifer  examen finalGomez ramos jhenifer  examen final
Gomez ramos jhenifer examen final
 
粒子系統 Particle system
粒子系統 Particle system粒子系統 Particle system
粒子系統 Particle system
 
Contaminación ambiental
Contaminación ambientalContaminación ambiental
Contaminación ambiental
 
CRVBreakoutGlenzinski090807
CRVBreakoutGlenzinski090807CRVBreakoutGlenzinski090807
CRVBreakoutGlenzinski090807
 
Modelos de equipamiento
Modelos de equipamientoModelos de equipamiento
Modelos de equipamiento
 
Biografía daniel
Biografía danielBiografía daniel
Biografía daniel
 
Pauly_Epifanio_Resume
Pauly_Epifanio_ResumePauly_Epifanio_Resume
Pauly_Epifanio_Resume
 
Propiedadesdel arandano
Propiedadesdel arandanoPropiedadesdel arandano
Propiedadesdel arandano
 
Poonam Jangam
Poonam JangamPoonam Jangam
Poonam Jangam
 
Escuela preparatoria-oficial-anexa-a-la-normal-de
Escuela preparatoria-oficial-anexa-a-la-normal-deEscuela preparatoria-oficial-anexa-a-la-normal-de
Escuela preparatoria-oficial-anexa-a-la-normal-de
 
situación de aprendizaje del campo de pensamiento matematico integrando un so...
situación de aprendizaje del campo de pensamiento matematico integrando un so...situación de aprendizaje del campo de pensamiento matematico integrando un so...
situación de aprendizaje del campo de pensamiento matematico integrando un so...
 
物聯網技術分享 使用ESP8266
物聯網技術分享 使用ESP8266物聯網技術分享 使用ESP8266
物聯網技術分享 使用ESP8266
 

Similaire à web optimizations

Frontend performance
Frontend performanceFrontend performance
Frontend performancesacred 8
 
Asp.net performance secrets
Asp.net performance secretsAsp.net performance secrets
Asp.net performance secretsMahmoud Ghoz
 
How i acheived a pretty good google page speed insights score
How i acheived a pretty good google page speed insights scoreHow i acheived a pretty good google page speed insights score
How i acheived a pretty good google page speed insights scoreMatt Bailey
 
Tips for a Faster Website
Tips for a Faster WebsiteTips for a Faster Website
Tips for a Faster WebsiteRayed Alrashed
 
Web Performance, Scalability, and Testing Techniques - Boston PHP Meetup
Web Performance, Scalability, and Testing Techniques - Boston PHP MeetupWeb Performance, Scalability, and Testing Techniques - Boston PHP Meetup
Web Performance, Scalability, and Testing Techniques - Boston PHP MeetupJonathan Klein
 
Client Side Performance @ Xero
Client Side Performance @ XeroClient Side Performance @ Xero
Client Side Performance @ XeroCraig Walker
 
Magento Performance Optimization 101
Magento Performance Optimization 101Magento Performance Optimization 101
Magento Performance Optimization 101Angus Li
 
High Performance Ajax Applications
High Performance Ajax ApplicationsHigh Performance Ajax Applications
High Performance Ajax ApplicationsSiarhei Barysiuk
 
Improving web site performance and scalability while saving
Improving web site performance and scalability while savingImproving web site performance and scalability while saving
Improving web site performance and scalability while savingmdc11
 
DrupalCampLA 2011 - Drupal frontend-optimizing
DrupalCampLA 2011 - Drupal frontend-optimizingDrupalCampLA 2011 - Drupal frontend-optimizing
DrupalCampLA 2011 - Drupal frontend-optimizingAshok Modi
 
OSDC 2012 | Ultra-performant dynamic websites with Varnish by Dr. Chriatian W...
OSDC 2012 | Ultra-performant dynamic websites with Varnish by Dr. Chriatian W...OSDC 2012 | Ultra-performant dynamic websites with Varnish by Dr. Chriatian W...
OSDC 2012 | Ultra-performant dynamic websites with Varnish by Dr. Chriatian W...NETWAYS
 
High Performance Web Pages - 20 new best practices
High Performance Web Pages - 20 new best practicesHigh Performance Web Pages - 20 new best practices
High Performance Web Pages - 20 new best practicesStoyan Stefanov
 
Optimizing the performance of WordPress
Optimizing the performance of WordPressOptimizing the performance of WordPress
Optimizing the performance of WordPressJosh Highland Giese
 
Building high scale, highly available websites in SharePoint 2010
Building high scale, highly available websites in SharePoint 2010Building high scale, highly available websites in SharePoint 2010
Building high scale, highly available websites in SharePoint 2010Ben Robb
 
Asp.net performance
Asp.net performanceAsp.net performance
Asp.net performanceAbhishek Sur
 
Drupal performance and scalability
Drupal performance and scalabilityDrupal performance and scalability
Drupal performance and scalabilityTwinbit
 
Cache is keeping you from reaching the full potential as a developer (word ca...
Cache is keeping you from reaching the full potential as a developer (word ca...Cache is keeping you from reaching the full potential as a developer (word ca...
Cache is keeping you from reaching the full potential as a developer (word ca...Thomas Audunhus
 

Similaire à web optimizations (20)

Frontend performance
Frontend performanceFrontend performance
Frontend performance
 
Speed!
Speed!Speed!
Speed!
 
Asp.net performance secrets
Asp.net performance secretsAsp.net performance secrets
Asp.net performance secrets
 
23 Ways To Speed Up WordPress
23 Ways To Speed Up WordPress23 Ways To Speed Up WordPress
23 Ways To Speed Up WordPress
 
How i acheived a pretty good google page speed insights score
How i acheived a pretty good google page speed insights scoreHow i acheived a pretty good google page speed insights score
How i acheived a pretty good google page speed insights score
 
Tips for a Faster Website
Tips for a Faster WebsiteTips for a Faster Website
Tips for a Faster Website
 
Web Performance, Scalability, and Testing Techniques - Boston PHP Meetup
Web Performance, Scalability, and Testing Techniques - Boston PHP MeetupWeb Performance, Scalability, and Testing Techniques - Boston PHP Meetup
Web Performance, Scalability, and Testing Techniques - Boston PHP Meetup
 
Client Side Performance @ Xero
Client Side Performance @ XeroClient Side Performance @ Xero
Client Side Performance @ Xero
 
Magento Performance Optimization 101
Magento Performance Optimization 101Magento Performance Optimization 101
Magento Performance Optimization 101
 
High Performance Ajax Applications
High Performance Ajax ApplicationsHigh Performance Ajax Applications
High Performance Ajax Applications
 
Improving web site performance and scalability while saving
Improving web site performance and scalability while savingImproving web site performance and scalability while saving
Improving web site performance and scalability while saving
 
DrupalCampLA 2011 - Drupal frontend-optimizing
DrupalCampLA 2011 - Drupal frontend-optimizingDrupalCampLA 2011 - Drupal frontend-optimizing
DrupalCampLA 2011 - Drupal frontend-optimizing
 
OSDC 2012 | Ultra-performant dynamic websites with Varnish by Dr. Chriatian W...
OSDC 2012 | Ultra-performant dynamic websites with Varnish by Dr. Chriatian W...OSDC 2012 | Ultra-performant dynamic websites with Varnish by Dr. Chriatian W...
OSDC 2012 | Ultra-performant dynamic websites with Varnish by Dr. Chriatian W...
 
High Performance Web Pages - 20 new best practices
High Performance Web Pages - 20 new best practicesHigh Performance Web Pages - 20 new best practices
High Performance Web Pages - 20 new best practices
 
Optimizing the performance of WordPress
Optimizing the performance of WordPressOptimizing the performance of WordPress
Optimizing the performance of WordPress
 
Web performance Talk
Web performance TalkWeb performance Talk
Web performance Talk
 
Building high scale, highly available websites in SharePoint 2010
Building high scale, highly available websites in SharePoint 2010Building high scale, highly available websites in SharePoint 2010
Building high scale, highly available websites in SharePoint 2010
 
Asp.net performance
Asp.net performanceAsp.net performance
Asp.net performance
 
Drupal performance and scalability
Drupal performance and scalabilityDrupal performance and scalability
Drupal performance and scalability
 
Cache is keeping you from reaching the full potential as a developer (word ca...
Cache is keeping you from reaching the full potential as a developer (word ca...Cache is keeping you from reaching the full potential as a developer (word ca...
Cache is keeping you from reaching the full potential as a developer (word ca...
 

web optimizations