SlideShare une entreprise Scribd logo
1  sur  52
A Holistic Approach to
Web Performance
About Me
Austin Gil (@Stegosource)
Lead developer at Visceral
(www.thisisvisceral.com)
I build kick-ass websites
and web apps that make life
better for clients and users.
I also break things sometimes....
Overview
1. Why performance matters
2. Concepts related to performance
3. Optimization throughout a project
4. Testing & recap
5. Questions & recommended tools
Performance: Why Do We Care?
(Super quick overview)
User Experience
Faster loading websites
have been proven to
keep visitor on the site
and interacting longer.
Visitors also are more
likely to return to fast
sites, or avoid slow sites.
SEO
In 2010, Google decided
that page speed would
be incorporated in their
page ranking algorithm.
It is not the most
important ranking signal,
but worth noting.
Money
Performance factors
directly affect conversion.
Speed affects time spent
on site management.
Lightweight sites are
easier on data.
The Cost of Latency
“In 2008, Amazon found that every 100ms of
latency cost them 1% in sales.”
Amazon earns over $100 BILLION per year
...so 100ms = $1 billion
Let’s go!
1. Choose a good host
2. Enable Gzip compression
3. Minimize redirects
4. Combine JS files
5. Defer JS parsing
6. Off-load the assets
7. Remove unused plugins
8. Use image srcset
9. Optimize database
19. Minify HTML
20. Minify CSS
21. Minify Javascript
22. Avoid CSS @import
23. Remove query strings
24. Specify image dimensions
25. Use data URIs
26. Serve scaled images
27. Specify character set
28. Reduce database calls
10. Use image sprites
11. Styles in header
12. Scripts in footer
13. Lazy load images
14. Enable caching
15. Optimize Images
16. Optimize WP_Query
17. Reduce DNS Lookups
18. Combine CSS files
COMMANDMENTS OF WEB
PERFORMANCE!!!“Thou shalt not take the name of thy lord,
Performance, in vain”
It’s Not That Complicated
Optimization Simplified to 3 Rules
Send fewer things
Send smaller things
Send things efficiently
Optimize During Each Stage
Item 2
Project Planning - PM’s / Clients
Production - Developers
Architecture & Design - Designers
Planning
Big Players
- Client “requirements” (see: sliders)
- CDN (Cloudflare)
- Client uploads
- Hosting
Be the Expert
Item 2Designers
- Educate & position yourself
- Educate your clients (use metrics)
- Share examples
- Learn to compromise (a.k.a. say “no”)
Show Up Prepared
Item 2Designers
- Know your hosts (PHP 7, SSD, HTTP/2)
- Know your CDN’s (cost & effort)
- Know your client (budget & needs)
Make Things Easy
Item 2Designers- Manage uploads
- Share useful tools
- Provide detailed documentation
- Do it for them...with a maintenance plan :)
- Image dimensions (Imsanity)
- Image quality (EWWW)
- Image editors (Pixlr, GIMP)
Design
Big Players
- Amount of content
- Multimedia (images, videos, audio)
- Complexity
Content & Layouts
Item 2Designers- Grids
- Break up content (multi-page, AJAX)
- Replace images
Less is More
Item 2Designers
- Font families (System Fonts, Google fonts)
- Icon libraries (Fontello, Icomoon)
- 3rd party elements (ads, maps, social)
0.3s load time - Motherfuckingwebsite.com
Icon Libraries Compared
Item 2 Designers
Font Awesome:
Font + CSS
270kb
Fontello (10):
Font + CSS
-93%
Glyphicons:
Font + CSS
-60%
108kb 19kb
Sliders/Carousels
Item 2Designers- Just don’t
- There are alternatives
- They bloat your page
- They’re bad for SEO (Yoast agrees)
- They’re bad for accessibility
- They don’t convert (about 1% after first slide)
Images
Item 2Designers- Save for web
- Automate
- Simpler images (flat design)
- Know your file types (jpg, png, svg)
Item 2Designers
Image Optimization Example
Original
621 kb
Save for web (60%)
275 kb
-56%
Original Image = 1250 x 877px, complex, many colors
Optimization tool (TinyPNG)
192 kb
-69%
The Affect of Image Effects
(we can go even smaller)
B & W
131kb
-32%
Monochrome
99kb
-49%
Gaussian Blur
(5px)
77kb
-60%
Partial Effects
B & W Mask
167kb
-13%
Blur Mask
162kb
-16%
Transparent
Overlay
135kb
-30%
Color Mask
130kb
-32%
Production
Big players
Item 2Designers
- Caching
- How you <img>
- Unnecessary resources
- Database
Caching
Item 2Designers
- Manually…
- WP Rocket (Paid)
- WP Fastest Cache
- W3 Total Cache
- The WordPress way
Image Markup
Item 2Designers
- Image sizes (Settings > Media)
- Use srcset: <img src=“...” srcset=“...” />
- get_post_thumbnail( $post_id )
- wp_get_attachment_image( $img_id )
- Match to major breakpoints
- Responsive background images (Gist)(Pen)
Lazy Load Images
Item 2Designers- Lazy Load (Lazy Load)
- Progressive Lazy Load (Gist)(Pen)
- Load thumbnail overlay (blur with CSS)
- Javascript load full size
- Fade out thumbnail
- Load tiny transparent img
- User interaction (scroll, click)
- Use JS to replace with actual image
- Accessibility...?
Scripts & Styles
Item 2Designers
- Minify & concatenate
- Conditional load
- Plugins (Autoptimize)
- Taks runners (Gulp, Grunt, Webpack)
- Manually (Shrinker)
- If ( is_font_page() ) { wp_enqueue_script(“...”) }
- Only when a shortcode is present (Article)(Gist)
- Plugins (Plugin Organizer, WP Asset Clean Up)
- It’s ok to dequeue
CSS Grids Compared
Item 2 Designers
Bootstrap:
CSS & JS:
152kb
Custom Grid:
CSS: 5kb
-97%
PureCSS:
CSS: 27kb
-82%
More cool CSS info and tools at CSSPurge.com
Queries
Item 2Designers- Learn WP_Query (Codex)
- Reuse same query
- wp_reset_query()
- Filter in query (post_type, posts_per_page, meta_query, tax_query, etc.)
- WP_Query optimization tricks
- Optimize database (Optimize Database after Deleting Revisions)
Offload Resources
Item 2Designers
- Understand what you’re doing
- Images (Flickr, ImageEngine)
- Videos (YouTube, Vimeo)
- Audio (SoundCloud)
- Scripts & styles (JSDelivr) (Gist)
- Take advantage of hosted services
What About Servers?
Item 2Designers
- A look at the modern WordPress server stack
- Carl Alexander is AWESOME
Test, Analyze,
Repeat
Item 2Designers
- Query Monitor - Too much goodness to write
Testing Tools
- GT Metrix - Webpage grades and advice
- P3 - Compare plugin load times
- Bitcatcha - Server speed testing
Item 2Designers
Address Biggest Impactors First
- Upgrade your host
- Enable caching
- Check your file sizes
Item 2Designers
- Swap out plugins
Low Hanging Fruit
- Optimization plugins
- Remove unnecessary everything
[clap_hands]
Designers
Image Optimization Tools - TinyPNG or Kraken: Support batch uploads/downloads. Results vary.
Image Optimization Plugins (choose one):
EWWW: Plug n’ play. Free. Good for agencies with lots of projects.
Compress JPEG & PNG images: Better performance. Freemium. Requires account.
Imsanity (plugin): Automatically resize super large uploads. Plug n’ play.
WP ImageEngine Responsive Image Resizer (plugin): Image hosting service
File Minification & Concatenation Tools:
Autoptimize (plugin): Easy to use, but be careful, it can break things sometimes. Test it.
Gulp, Grunt, or Webpack: Task runners. Add to workflow to automate file optimization (advanced)
Shrinker: Online tool. Supports inserted code, upload files, or upload from URL
Conditional Load Assets Plugins (choose one):
Plugin Organizer: Lot’s of setup work. Good for individuals fine tuning.
WP Asset Clean Up: Not as powerful, but much more simple to set up.
JSDelivr: Scripts & styles CDN. Also can minify and concatenate.
Optimize Database after Deleting Revisions: Database optimization plugin. Supports schedules.
Cloudflare: Free CDN

Contenu connexe

Tendances

Tendances (20)

Webpack essentails - feb 19, 2020
Webpack essentails - feb 19, 2020Webpack essentails - feb 19, 2020
Webpack essentails - feb 19, 2020
 
Modernizing Your WordPress Workflow with Grunt & Bower
Modernizing Your WordPress Workflow with Grunt & BowerModernizing Your WordPress Workflow with Grunt & Bower
Modernizing Your WordPress Workflow with Grunt & Bower
 
The WordPress Performance Team
The WordPress Performance TeamThe WordPress Performance Team
The WordPress Performance Team
 
WordPress on the Jamstack by rtCamper Muhammad Muhsin @ WordPress Colombo Meetup
WordPress on the Jamstack by rtCamper Muhammad Muhsin @ WordPress Colombo MeetupWordPress on the Jamstack by rtCamper Muhammad Muhsin @ WordPress Colombo Meetup
WordPress on the Jamstack by rtCamper Muhammad Muhsin @ WordPress Colombo Meetup
 
Build Your Blazing Fast Site with Gatsby and WordPress @ WordSesh by Muhammad...
Build Your Blazing Fast Site with Gatsby and WordPress @ WordSesh by Muhammad...Build Your Blazing Fast Site with Gatsby and WordPress @ WordSesh by Muhammad...
Build Your Blazing Fast Site with Gatsby and WordPress @ WordSesh by Muhammad...
 
Make Local WordPress Development Simple
Make Local WordPress Development SimpleMake Local WordPress Development Simple
Make Local WordPress Development Simple
 
Making websites with WordPress
Making websites with WordPressMaking websites with WordPress
Making websites with WordPress
 
Internationalizing The New York Times
Internationalizing The New York TimesInternationalizing The New York Times
Internationalizing The New York Times
 
Blazor v1.1
Blazor v1.1Blazor v1.1
Blazor v1.1
 
WP-CLI: WordCamp Nashville 2016
WP-CLI: WordCamp Nashville 2016WP-CLI: WordCamp Nashville 2016
WP-CLI: WordCamp Nashville 2016
 
Nürnberg WooCommerce Talk - 11/24/16
Nürnberg WooCommerce Talk - 11/24/16Nürnberg WooCommerce Talk - 11/24/16
Nürnberg WooCommerce Talk - 11/24/16
 
Core Web Vitals Optimization for any website, especially WordPress
Core Web Vitals Optimization for any website, especially WordPressCore Web Vitals Optimization for any website, especially WordPress
Core Web Vitals Optimization for any website, especially WordPress
 
10 things to do to speed up your site
10 things to do to speed up your site10 things to do to speed up your site
10 things to do to speed up your site
 
Way of the Future
Way of the FutureWay of the Future
Way of the Future
 
Introduction to git & WordPress
Introduction to git & WordPressIntroduction to git & WordPress
Introduction to git & WordPress
 
WordPress development checklist
WordPress development checklistWordPress development checklist
WordPress development checklist
 
Lazy angular w/ webpack
Lazy angular w/ webpackLazy angular w/ webpack
Lazy angular w/ webpack
 
WordPress plugin development
WordPress plugin developmentWordPress plugin development
WordPress plugin development
 
Time's Important - Let Task Management Save Yours
Time's Important - Let Task Management Save YoursTime's Important - Let Task Management Save Yours
Time's Important - Let Task Management Save Yours
 
Content as a Service: What to Know About Decoupled CMS
Content as a Service: What to Know About Decoupled CMSContent as a Service: What to Know About Decoupled CMS
Content as a Service: What to Know About Decoupled CMS
 

En vedette

En vedette (20)

Web Performance: 3 Stages to Success
Web Performance: 3 Stages to SuccessWeb Performance: 3 Stages to Success
Web Performance: 3 Stages to Success
 
Understanding and Supporting Web Accessibility
Understanding and Supporting Web AccessibilityUnderstanding and Supporting Web Accessibility
Understanding and Supporting Web Accessibility
 
Improve WordPress load times with a CDN
Improve WordPress load times with a CDNImprove WordPress load times with a CDN
Improve WordPress load times with a CDN
 
Isotope, WP REST API, and AJAX...Oh my!
Isotope,  WP REST API, and AJAX...Oh my!Isotope,  WP REST API, and AJAX...Oh my!
Isotope, WP REST API, and AJAX...Oh my!
 
wp cli- don’t fear the command line
wp cli- don’t fear the command linewp cli- don’t fear the command line
wp cli- don’t fear the command line
 
Five events in the life of every WordPress request you should know
Five events in the life of every WordPress request you should knowFive events in the life of every WordPress request you should know
Five events in the life of every WordPress request you should know
 
Building a JavaScript App powered by WordPress & AngularJS
Building a JavaScript App powered by WordPress & AngularJSBuilding a JavaScript App powered by WordPress & AngularJS
Building a JavaScript App powered by WordPress & AngularJS
 
A Simple Way to Customize Your Site
A Simple Way to Customize Your SiteA Simple Way to Customize Your Site
A Simple Way to Customize Your Site
 
Spare Me From Your Stupid Slideshow - WordCamp San Diego, 2017
Spare Me From Your Stupid Slideshow - WordCamp San Diego, 2017Spare Me From Your Stupid Slideshow - WordCamp San Diego, 2017
Spare Me From Your Stupid Slideshow - WordCamp San Diego, 2017
 
Caldera Learn - LoopConf WP API + Angular FTW Workshop
Caldera Learn - LoopConf WP API + Angular FTW WorkshopCaldera Learn - LoopConf WP API + Angular FTW Workshop
Caldera Learn - LoopConf WP API + Angular FTW Workshop
 
Connecting Content Silos: One CMS, Many Sites With The WordPress REST API
 Connecting Content Silos: One CMS, Many Sites With The WordPress REST API Connecting Content Silos: One CMS, Many Sites With The WordPress REST API
Connecting Content Silos: One CMS, Many Sites With The WordPress REST API
 
GlotPress aka translate.wordpress.org
GlotPress aka translate.wordpress.orgGlotPress aka translate.wordpress.org
GlotPress aka translate.wordpress.org
 
Tools And Techniques For Evaluating Accessibility
Tools And Techniques For Evaluating AccessibilityTools And Techniques For Evaluating Accessibility
Tools And Techniques For Evaluating Accessibility
 
Local SEO – Creating Website Content That Matters Regionally - WordCamp San D...
Local SEO – Creating Website Content That Matters Regionally - WordCamp San D...Local SEO – Creating Website Content That Matters Regionally - WordCamp San D...
Local SEO – Creating Website Content That Matters Regionally - WordCamp San D...
 
Lean JS Deeply, but don't forget about PHP!
Lean JS Deeply, but don't forget about PHP!Lean JS Deeply, but don't forget about PHP!
Lean JS Deeply, but don't forget about PHP!
 
Adventures in WooCommerce: Considerations for a Successful eCommerce Store
Adventures in WooCommerce: Considerations for a Successful eCommerce StoreAdventures in WooCommerce: Considerations for a Successful eCommerce Store
Adventures in WooCommerce: Considerations for a Successful eCommerce Store
 
「海外遠征が競走馬の成績に与える影響」
「海外遠征が競走馬の成績に与える影響」「海外遠征が競走馬の成績に与える影響」
「海外遠征が競走馬の成績に与える影響」
 
Andrew Feller Photography
Andrew Feller PhotographyAndrew Feller Photography
Andrew Feller Photography
 
La tecnologia e informatica
La tecnologia e informaticaLa tecnologia e informatica
La tecnologia e informatica
 
3Com 3C10385VCX
3Com 3C10385VCX3Com 3C10385VCX
3Com 3C10385VCX
 

Similaire à A holistic approach to web performance

Front end optimization
Front end optimizationFront end optimization
Front end optimization
Abhishek Anand
 
Implementing Large Scale Digital Asset Repositories with Adobe Experience Man...
Implementing Large Scale Digital Asset Repositories with Adobe Experience Man...Implementing Large Scale Digital Asset Repositories with Adobe Experience Man...
Implementing Large Scale Digital Asset Repositories with Adobe Experience Man...
devang-dsshah
 
Scaling digital asset repositories with aem dam and s7 by Devang Shah
Scaling digital asset repositories with aem dam and s7 by Devang ShahScaling digital asset repositories with aem dam and s7 by Devang Shah
Scaling digital asset repositories with aem dam and s7 by Devang Shah
AEM HUB
 

Similaire à A holistic approach to web performance (20)

implement lighthouse-ci with your web development workflow
implement lighthouse-ci with your web development workflowimplement lighthouse-ci with your web development workflow
implement lighthouse-ci with your web development workflow
 
Presentation Tier optimizations
Presentation Tier optimizationsPresentation Tier optimizations
Presentation Tier optimizations
 
The Need for Speed (5 Performance Optimization Tipps) - brightonSEO 2014
The Need for Speed (5 Performance Optimization Tipps) - brightonSEO 2014The Need for Speed (5 Performance Optimization Tipps) - brightonSEO 2014
The Need for Speed (5 Performance Optimization Tipps) - brightonSEO 2014
 
How We Build NG-MY Websites: Performance, SEO, CI, CD (Thai version)
How We Build NG-MY Websites: Performance, SEO, CI, CD (Thai version)How We Build NG-MY Websites: Performance, SEO, CI, CD (Thai version)
How We Build NG-MY Websites: Performance, SEO, CI, CD (Thai version)
 
How We Build NG-MY Websites: Performance, SEO, CI, CD
How We Build NG-MY Websites: Performance, SEO, CI, CDHow We Build NG-MY Websites: Performance, SEO, CI, CD
How We Build NG-MY Websites: Performance, SEO, CI, CD
 
Front end optimization
Front end optimizationFront end optimization
Front end optimization
 
Web Application Performance for Business Success
Web Application Performance for Business SuccessWeb Application Performance for Business Success
Web Application Performance for Business Success
 
Super speed around the globe - SearchLeeds 2018
Super speed around the globe - SearchLeeds 2018Super speed around the globe - SearchLeeds 2018
Super speed around the globe - SearchLeeds 2018
 
SearchLeeds 2018 - Bastian Grimm - Peak Ace - International site speed: Going...
SearchLeeds 2018 - Bastian Grimm - Peak Ace - International site speed: Going...SearchLeeds 2018 - Bastian Grimm - Peak Ace - International site speed: Going...
SearchLeeds 2018 - Bastian Grimm - Peak Ace - International site speed: Going...
 
23 Ways To Speed Up WordPress
23 Ways To Speed Up WordPress23 Ways To Speed Up WordPress
23 Ways To Speed Up WordPress
 
Building and scaling a B2D service, the bootstrap way
Building and scaling a B2D service, the bootstrap wayBuilding and scaling a B2D service, the bootstrap way
Building and scaling a B2D service, the bootstrap way
 
Optimize Images for SEO WordCamp Sacramento
Optimize Images for SEO WordCamp SacramentoOptimize Images for SEO WordCamp Sacramento
Optimize Images for SEO WordCamp Sacramento
 
Vered Flis: Because performance matters! Architecture Next 20
Vered Flis: Because performance matters! Architecture Next 20Vered Flis: Because performance matters! Architecture Next 20
Vered Flis: Because performance matters! Architecture Next 20
 
2022.04 - CSS Day IT - Images Optimisation 4.0
2022.04 - CSS Day IT - Images Optimisation 4.02022.04 - CSS Day IT - Images Optimisation 4.0
2022.04 - CSS Day IT - Images Optimisation 4.0
 
Implementing Large Scale Digital Asset Repositories with Adobe Experience Man...
Implementing Large Scale Digital Asset Repositories with Adobe Experience Man...Implementing Large Scale Digital Asset Repositories with Adobe Experience Man...
Implementing Large Scale Digital Asset Repositories with Adobe Experience Man...
 
Scaling digital asset repositories with aem dam and s7 by Devang Shah
Scaling digital asset repositories with aem dam and s7 by Devang ShahScaling digital asset repositories with aem dam and s7 by Devang Shah
Scaling digital asset repositories with aem dam and s7 by Devang Shah
 
Word press optimizations
Word press optimizations Word press optimizations
Word press optimizations
 
The need for Speed: Advanced #webperf - SEOday 2018
The need for Speed: Advanced #webperf - SEOday 2018The need for Speed: Advanced #webperf - SEOday 2018
The need for Speed: Advanced #webperf - SEOday 2018
 
Droidcon Paris 2015
Droidcon Paris 2015Droidcon Paris 2015
Droidcon Paris 2015
 
Web Optimisation
Web OptimisationWeb Optimisation
Web Optimisation
 

Dernier

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 

Dernier (20)

Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 

A holistic approach to web performance

  • 1. A Holistic Approach to Web Performance
  • 2. About Me Austin Gil (@Stegosource) Lead developer at Visceral (www.thisisvisceral.com) I build kick-ass websites and web apps that make life better for clients and users. I also break things sometimes....
  • 3. Overview 1. Why performance matters 2. Concepts related to performance 3. Optimization throughout a project 4. Testing & recap 5. Questions & recommended tools
  • 4. Performance: Why Do We Care? (Super quick overview)
  • 5. User Experience Faster loading websites have been proven to keep visitor on the site and interacting longer. Visitors also are more likely to return to fast sites, or avoid slow sites. SEO In 2010, Google decided that page speed would be incorporated in their page ranking algorithm. It is not the most important ranking signal, but worth noting. Money Performance factors directly affect conversion. Speed affects time spent on site management. Lightweight sites are easier on data.
  • 6. The Cost of Latency “In 2008, Amazon found that every 100ms of latency cost them 1% in sales.” Amazon earns over $100 BILLION per year ...so 100ms = $1 billion
  • 8.
  • 9. 1. Choose a good host 2. Enable Gzip compression 3. Minimize redirects 4. Combine JS files 5. Defer JS parsing 6. Off-load the assets 7. Remove unused plugins 8. Use image srcset 9. Optimize database 19. Minify HTML 20. Minify CSS 21. Minify Javascript 22. Avoid CSS @import 23. Remove query strings 24. Specify image dimensions 25. Use data URIs 26. Serve scaled images 27. Specify character set 28. Reduce database calls 10. Use image sprites 11. Styles in header 12. Scripts in footer 13. Lazy load images 14. Enable caching 15. Optimize Images 16. Optimize WP_Query 17. Reduce DNS Lookups 18. Combine CSS files COMMANDMENTS OF WEB PERFORMANCE!!!“Thou shalt not take the name of thy lord, Performance, in vain”
  • 10. It’s Not That Complicated
  • 11. Optimization Simplified to 3 Rules Send fewer things Send smaller things Send things efficiently
  • 12. Optimize During Each Stage Item 2 Project Planning - PM’s / Clients Production - Developers Architecture & Design - Designers
  • 14. Big Players - Client “requirements” (see: sliders) - CDN (Cloudflare) - Client uploads - Hosting
  • 15. Be the Expert Item 2Designers - Educate & position yourself - Educate your clients (use metrics) - Share examples - Learn to compromise (a.k.a. say “no”)
  • 16. Show Up Prepared Item 2Designers - Know your hosts (PHP 7, SSD, HTTP/2) - Know your CDN’s (cost & effort) - Know your client (budget & needs)
  • 17. Make Things Easy Item 2Designers- Manage uploads - Share useful tools - Provide detailed documentation - Do it for them...with a maintenance plan :) - Image dimensions (Imsanity) - Image quality (EWWW) - Image editors (Pixlr, GIMP)
  • 19. Big Players - Amount of content - Multimedia (images, videos, audio) - Complexity
  • 20. Content & Layouts Item 2Designers- Grids - Break up content (multi-page, AJAX) - Replace images
  • 21. Less is More Item 2Designers - Font families (System Fonts, Google fonts) - Icon libraries (Fontello, Icomoon) - 3rd party elements (ads, maps, social)
  • 22. 0.3s load time - Motherfuckingwebsite.com
  • 23. Icon Libraries Compared Item 2 Designers Font Awesome: Font + CSS 270kb Fontello (10): Font + CSS -93% Glyphicons: Font + CSS -60% 108kb 19kb
  • 24. Sliders/Carousels Item 2Designers- Just don’t - There are alternatives - They bloat your page - They’re bad for SEO (Yoast agrees) - They’re bad for accessibility - They don’t convert (about 1% after first slide)
  • 25. Images Item 2Designers- Save for web - Automate - Simpler images (flat design) - Know your file types (jpg, png, svg)
  • 26. Item 2Designers Image Optimization Example Original 621 kb Save for web (60%) 275 kb -56% Original Image = 1250 x 877px, complex, many colors Optimization tool (TinyPNG) 192 kb -69%
  • 27. The Affect of Image Effects (we can go even smaller)
  • 32. B & W Mask 167kb -13%
  • 36.
  • 38. Big players Item 2Designers - Caching - How you <img> - Unnecessary resources - Database
  • 39. Caching Item 2Designers - Manually… - WP Rocket (Paid) - WP Fastest Cache - W3 Total Cache - The WordPress way
  • 40. Image Markup Item 2Designers - Image sizes (Settings > Media) - Use srcset: <img src=“...” srcset=“...” /> - get_post_thumbnail( $post_id ) - wp_get_attachment_image( $img_id ) - Match to major breakpoints - Responsive background images (Gist)(Pen)
  • 41. Lazy Load Images Item 2Designers- Lazy Load (Lazy Load) - Progressive Lazy Load (Gist)(Pen) - Load thumbnail overlay (blur with CSS) - Javascript load full size - Fade out thumbnail - Load tiny transparent img - User interaction (scroll, click) - Use JS to replace with actual image - Accessibility...?
  • 42. Scripts & Styles Item 2Designers - Minify & concatenate - Conditional load - Plugins (Autoptimize) - Taks runners (Gulp, Grunt, Webpack) - Manually (Shrinker) - If ( is_font_page() ) { wp_enqueue_script(“...”) } - Only when a shortcode is present (Article)(Gist) - Plugins (Plugin Organizer, WP Asset Clean Up) - It’s ok to dequeue
  • 43. CSS Grids Compared Item 2 Designers Bootstrap: CSS & JS: 152kb Custom Grid: CSS: 5kb -97% PureCSS: CSS: 27kb -82% More cool CSS info and tools at CSSPurge.com
  • 44. Queries Item 2Designers- Learn WP_Query (Codex) - Reuse same query - wp_reset_query() - Filter in query (post_type, posts_per_page, meta_query, tax_query, etc.) - WP_Query optimization tricks - Optimize database (Optimize Database after Deleting Revisions)
  • 45. Offload Resources Item 2Designers - Understand what you’re doing - Images (Flickr, ImageEngine) - Videos (YouTube, Vimeo) - Audio (SoundCloud) - Scripts & styles (JSDelivr) (Gist) - Take advantage of hosted services
  • 46. What About Servers? Item 2Designers - A look at the modern WordPress server stack - Carl Alexander is AWESOME
  • 48. Item 2Designers - Query Monitor - Too much goodness to write Testing Tools - GT Metrix - Webpage grades and advice - P3 - Compare plugin load times - Bitcatcha - Server speed testing
  • 49. Item 2Designers Address Biggest Impactors First - Upgrade your host - Enable caching - Check your file sizes
  • 50. Item 2Designers - Swap out plugins Low Hanging Fruit - Optimization plugins - Remove unnecessary everything
  • 52. Designers Image Optimization Tools - TinyPNG or Kraken: Support batch uploads/downloads. Results vary. Image Optimization Plugins (choose one): EWWW: Plug n’ play. Free. Good for agencies with lots of projects. Compress JPEG & PNG images: Better performance. Freemium. Requires account. Imsanity (plugin): Automatically resize super large uploads. Plug n’ play. WP ImageEngine Responsive Image Resizer (plugin): Image hosting service File Minification & Concatenation Tools: Autoptimize (plugin): Easy to use, but be careful, it can break things sometimes. Test it. Gulp, Grunt, or Webpack: Task runners. Add to workflow to automate file optimization (advanced) Shrinker: Online tool. Supports inserted code, upload files, or upload from URL Conditional Load Assets Plugins (choose one): Plugin Organizer: Lot’s of setup work. Good for individuals fine tuning. WP Asset Clean Up: Not as powerful, but much more simple to set up. JSDelivr: Scripts & styles CDN. Also can minify and concatenate. Optimize Database after Deleting Revisions: Database optimization plugin. Supports schedules. Cloudflare: Free CDN