SlideShare ist ein Scribd-Unternehmen logo
1 von 33
Web Performance Optimization
for Modern Web Applications
Chris Love

@ChrisLove

ProfessionalASPNET.com
Slide Deck & Source Code

Slide Deck – http://slidesha.re/SzoqKs
Source Code – http://GitHub.com/docluv
Web Performance Optimization Resources

High Performance Web Sites - http://bitly.com/U7GStY
Even Faster Web Sites - http://amzn.to/WTiDFM
Web Performance Daybook - http://amzn.to/VV4Grz
High Performance JavaScript - http://amzn.to/Sq9IFC
Steve Souders - http://www.stevesouders.com/
Web performance optimization, WPO, or website
               optimization involves ongoing monitoring and
Web            testing of websites to achieve optimum

Performance    performance under given constraints. Usually
               optimization is restricted due to lack of complete
Optimization   information and metrics to evaluate the
               performance of a website.




                                             http://bit.ly/SWEh6E
"Also take a step back for a minute and consider
             the intent of this change: a faster web is great for
             everyone, but especially for users. Lots of
             websites have demonstrated that speeding up the
Matt Cutts   user experience results in more usage. So
             speeding up your website isn’t just something that
             can affect your search rankings–it’s a fantastic
             idea for your users."



                                             http://bit.ly/SPPB4k
Time === $$$$

Faster Sites Have Higher Conversion Rates




WalMart - http://bit.ly/S1fHSZ
Google – http://bit.ly/WajJbB
Amazon – http://bit.ly/S3UoAj
ShopZilla - http://bit.ly/RIQMDM
Folks at Walmart knew their pages were slow. As a for
          instance, initial measurement showed that an item page
          took about 24 seconds to load for the slowest 5% of users.

WalMart   Why? The usual culprits: too many page elements, slow
          third-party scripts, multiple hosts (25% of page content is
          served by partners, affiliates, and Marketplace), and various
          best practice no-nos




          http://bit.ly/WajJbB
Half a second delay caused a 20% drop in traffic.
½ Second   Half a second delay killed user satisfaction.


Delay      The lesson, Marissa said, is that speed matters.
           People do not like to wait. Do not make them.




           http://bit.ly/TPPhUp
WPO Fast Facts


 • 57% Will Abandon a Slow Site After 3 Seconds
 • We Have to Concentrate 50% Harder For Slow Sites
 • 78% Have Felt Stress or Anger With Slow Sites
 • 44% Say Slow Sites Make Them Anxious
 • 4% Have Thrown Their Phone



                                                   http://bit.ly/SuBLDR
Web Sites/Apps Are Getting Larger

86 Files Requests         53 Images
1.25MB                    750KB
15 JavaScript Files       14 Domains
214KB



                        http://bit.ly/PVlLOC
Web Sites/Apps Are Getting Larger
We Are Getting More Mobile
Assume Everyone is on Sprint 3G




                                  http://bit.ly/WebIqD
And Is Using Android




                       http://bit.ly/ZGMm4A
YSlow Rules

1. Minimize HTTP Requests                     13. Remove Duplicate Scripts
2. Use a Content Delivery Network             14. Configure ETags
3. Avoid empty src or href                    15. Make AJAX Cacheable
4. Add an Expires or a Cache-Control Header   16. Use GET for AJAX Requests
5. Gzip Components                            17. Reduce the Number of DOM Elements
6. Put StyleSheets at the Top                 18. No 404s
7. Put Scripts at the Bottom                  19. Reduce Cookie Size
8. Avoid CSS Expressions                      20. Use Cookie-Free Domains for Components
9. Make JavaScript and CSS External           21. Avoid Filters
10. Reduce DNS Lookups                        22. Do Not Scale Images in HTML
11. Minify JavaScript and CSS                 23. Make favicon.ico Small and Cacheable
12. Avoid Redirects


                                              http://yhoo.it/W7BFIw
YSlow Rules – That Will Play A Part Today 

1. Minimize HTTP Requests                     13.Remove Duplicate Scripts
2. Use a Content Delivery Network             14. Configure ETags
3. Avoid empty src or href                    15. Make AJAX Cacheable
4. Add an Expires or a Cache-Control Header   16. Use GET for AJAX Requests
5. Gzip Components                            17.Reduce the Number of DOM Elements
6. Put StyleSheets at the Top                 18.No 404s
7. Put Scripts at the Bottom                  19.Reduce Cookie Size
8. Avoid CSS Expressions                      20.Use Cookie-Free Domains for Components
9. Make JavaScript and CSS External           21. Avoid Filters
10.Reduce DNS Lookups                         22. Do Not Scale Images in HTML
11.Minify JavaScript and CSS                  23.Make favicon.ico Small and Cacheable
12. Avoid Redirects


                                              http://yhoo.it/W7BFIw
“Most of your scaling problems wont be
Mike Krieger   glamorous"




                                           http://bit.ly/QeKZsO
Make FavIcon Small and Cacheable

Don’t Return 404

Make Sure Its Compatible

       PNG/ICO

It Carries Cookie Weight



Instagram Lesson #1

http://bit.ly/RUXEiL
Speaking Of Cookies

 • Cookies Add Weight

 • Place Resources (img/css/js) on
   Cookieless Domains

 • Consider Local Storage Instead
Impact of Cookies on Response Time
Use LocalStorage For Storage & Caching

• Allows You to Keep Data Locally in a Hash Table
   • localStorage
   • sessionStorage
• Approximately 5MB
• Replace Cookies
• Great For Caching
Let’s Examine Southwest.com
                       • 95 File Requests
                       • 6 Domains
                       • 2 CSS
                       • 17 Documents
                       • 49 Images
                       • 30 JavaScript Files
                       • 4 AJAX Calls
                       • 786 KB – 1.25MB
                       • 2042 KB Request Header
                       • 16.5KB Cookie
                       • 1430 DOM Elements
Combine 19 JavaScript Files
Combine 19 JavaScript Files

 • Eliminated 18 file Requests

 • 42.6KB Header Data

 • Eliminated 18 Gzip Decompress
   Operations

 • Probably Shave ~ 1 Second
Southwest.com Page Structure

 <meta http-equiv="X-UA-Compatible"       content="IE=EmulateIE7"/>

 <link rel="shortcut icon" href="/assets/images/favicon.ico"/>

 <style> … </style>

 <script> … </script> - 22 Times

 Script References in the HEAD – Should be at the Bottom
Southwest.com Improvements

 Over the past few months I have been analyzing
 Southwest.com and have seen some tremendous
 improvements. Data transfer size has been cut in half
 this week alone. I have seen the complete load time
 reduced around 2 seconds in the past few weeks. The
 number of file requests has been reduced. So many be
 we will be privileged to a new WPO case study soon ;)
Let’s Look at Some Code!
Asynchronous Script Loading

  • Allows You to lazy Load Scripts
  • Great Way to Isolate 3rd Party Scripts
  • Helps Avoid Single Points of Failure

  •   Check For Existing Script Reference
  •   Creates New Element
  •   Executes a Callback When the Document is loaded
  •   Appends the Script to the BODY

                                             http://bit.ly/TKdo6C
Image Optimization Tricks

 • CSS Sprites

 • Data URIs

       <img src="data:image/png;base64,iVBORw0KGHAAAD…Zw4PIXZORK5CYII="/>


 • CSS3 Features

       • Rounded Corners

       • Gradients
Use Native Selectors Instead of jQuery




                             http://bit.ly/S0bwby
Optimize CSS

• Good Structure
    • Size

    • Colors

    • Views/Controls

    • Languages


• Avoid ID References #

Weitere ähnliche Inhalte

Was ist angesagt?

Building Faster Websites
Building Faster WebsitesBuilding Faster Websites
Building Faster WebsitesCraig Walker
 
API Best Practices
API Best PracticesAPI Best Practices
API Best PracticesUri Lavi
 
WordPress Theme Performance - WP Vienna meetup 8.6.2016
WordPress Theme Performance - WP Vienna meetup 8.6.2016WordPress Theme Performance - WP Vienna meetup 8.6.2016
WordPress Theme Performance - WP Vienna meetup 8.6.2016jancbeck
 
Fast and Easy Website Tuneups
Fast and Easy Website TuneupsFast and Easy Website Tuneups
Fast and Easy Website TuneupsJeff Wisniewski
 
Html5 Fit: Get Rid of Love Handles
Html5 Fit:  Get Rid of Love HandlesHtml5 Fit:  Get Rid of Love Handles
Html5 Fit: Get Rid of Love HandlesChris Love
 
Advanced front end debugging with ms edge and ms tools
Advanced front end debugging with ms edge and ms toolsAdvanced front end debugging with ms edge and ms tools
Advanced front end debugging with ms edge and ms toolsChris Love
 
The 5 most common reasons for a slow WordPress site and how to fix them – ext...
The 5 most common reasons for a slow WordPress site and how to fix them – ext...The 5 most common reasons for a slow WordPress site and how to fix them – ext...
The 5 most common reasons for a slow WordPress site and how to fix them – ext...Otto Kekäläinen
 
Build Better Responsive websites. Hrvoje Jurišić
Build Better Responsive websites. Hrvoje JurišićBuild Better Responsive websites. Hrvoje Jurišić
Build Better Responsive websites. Hrvoje JurišićMeetMagentoNY2014
 
SEO AJAX Crawlability in a Responsive Publisher World
SEO AJAX Crawlability in a Responsive Publisher WorldSEO AJAX Crawlability in a Responsive Publisher World
SEO AJAX Crawlability in a Responsive Publisher WorldEric Wu
 
Develop a vanilla.js spa you and your customers will love
Develop a vanilla.js spa you and your customers will loveDevelop a vanilla.js spa you and your customers will love
Develop a vanilla.js spa you and your customers will loveChris Love
 
Advanced Technical SEO - Index Bloat & Discovery: from Facets to Javascript F...
Advanced Technical SEO - Index Bloat & Discovery: from Facets to Javascript F...Advanced Technical SEO - Index Bloat & Discovery: from Facets to Javascript F...
Advanced Technical SEO - Index Bloat & Discovery: from Facets to Javascript F...Kahena Digital Marketing
 
DeepCrawl Webinar: Performing SEO on the Edge
DeepCrawl Webinar: Performing SEO on the EdgeDeepCrawl Webinar: Performing SEO on the Edge
DeepCrawl Webinar: Performing SEO on the EdgeDan Taylor
 
JavaScript front end performance optimizations
JavaScript front end performance optimizationsJavaScript front end performance optimizations
JavaScript front end performance optimizationsChris Love
 
Service workers your applications never felt so good
Service workers   your applications never felt so goodService workers   your applications never felt so good
Service workers your applications never felt so goodChris Love
 
Using Responsive Web Design To Make Your Web Work Everywhere - Updated
Using Responsive Web Design To Make Your Web Work Everywhere - UpdatedUsing Responsive Web Design To Make Your Web Work Everywhere - Updated
Using Responsive Web Design To Make Your Web Work Everywhere - UpdatedChris Love
 
17 Web Performance Metrics You Should Care About
17 Web Performance Metrics You Should Care About17 Web Performance Metrics You Should Care About
17 Web Performance Metrics You Should Care AboutEvgeny Tsarkov
 
That's crazy! how to build single page web apps
That's crazy! how to build single page web appsThat's crazy! how to build single page web apps
That's crazy! how to build single page web appsChris Love
 
BrightonSEO 2019 - Edge SEO - Using CDNs To Perform SEO On The Edge
BrightonSEO 2019 - Edge SEO - Using CDNs To Perform SEO On The EdgeBrightonSEO 2019 - Edge SEO - Using CDNs To Perform SEO On The Edge
BrightonSEO 2019 - Edge SEO - Using CDNs To Perform SEO On The EdgeDan Taylor
 

Was ist angesagt? (20)

Building Faster Websites
Building Faster WebsitesBuilding Faster Websites
Building Faster Websites
 
API Best Practices
API Best PracticesAPI Best Practices
API Best Practices
 
WordPress Theme Performance - WP Vienna meetup 8.6.2016
WordPress Theme Performance - WP Vienna meetup 8.6.2016WordPress Theme Performance - WP Vienna meetup 8.6.2016
WordPress Theme Performance - WP Vienna meetup 8.6.2016
 
Fast and Easy Website Tuneups
Fast and Easy Website TuneupsFast and Easy Website Tuneups
Fast and Easy Website Tuneups
 
HTML5
HTML5HTML5
HTML5
 
Html5 Fit: Get Rid of Love Handles
Html5 Fit:  Get Rid of Love HandlesHtml5 Fit:  Get Rid of Love Handles
Html5 Fit: Get Rid of Love Handles
 
Advanced front end debugging with ms edge and ms tools
Advanced front end debugging with ms edge and ms toolsAdvanced front end debugging with ms edge and ms tools
Advanced front end debugging with ms edge and ms tools
 
The 5 most common reasons for a slow WordPress site and how to fix them – ext...
The 5 most common reasons for a slow WordPress site and how to fix them – ext...The 5 most common reasons for a slow WordPress site and how to fix them – ext...
The 5 most common reasons for a slow WordPress site and how to fix them – ext...
 
Build Better Responsive websites. Hrvoje Jurišić
Build Better Responsive websites. Hrvoje JurišićBuild Better Responsive websites. Hrvoje Jurišić
Build Better Responsive websites. Hrvoje Jurišić
 
What is HTML 5?
What is HTML 5?What is HTML 5?
What is HTML 5?
 
SEO AJAX Crawlability in a Responsive Publisher World
SEO AJAX Crawlability in a Responsive Publisher WorldSEO AJAX Crawlability in a Responsive Publisher World
SEO AJAX Crawlability in a Responsive Publisher World
 
Develop a vanilla.js spa you and your customers will love
Develop a vanilla.js spa you and your customers will loveDevelop a vanilla.js spa you and your customers will love
Develop a vanilla.js spa you and your customers will love
 
Advanced Technical SEO - Index Bloat & Discovery: from Facets to Javascript F...
Advanced Technical SEO - Index Bloat & Discovery: from Facets to Javascript F...Advanced Technical SEO - Index Bloat & Discovery: from Facets to Javascript F...
Advanced Technical SEO - Index Bloat & Discovery: from Facets to Javascript F...
 
DeepCrawl Webinar: Performing SEO on the Edge
DeepCrawl Webinar: Performing SEO on the EdgeDeepCrawl Webinar: Performing SEO on the Edge
DeepCrawl Webinar: Performing SEO on the Edge
 
JavaScript front end performance optimizations
JavaScript front end performance optimizationsJavaScript front end performance optimizations
JavaScript front end performance optimizations
 
Service workers your applications never felt so good
Service workers   your applications never felt so goodService workers   your applications never felt so good
Service workers your applications never felt so good
 
Using Responsive Web Design To Make Your Web Work Everywhere - Updated
Using Responsive Web Design To Make Your Web Work Everywhere - UpdatedUsing Responsive Web Design To Make Your Web Work Everywhere - Updated
Using Responsive Web Design To Make Your Web Work Everywhere - Updated
 
17 Web Performance Metrics You Should Care About
17 Web Performance Metrics You Should Care About17 Web Performance Metrics You Should Care About
17 Web Performance Metrics You Should Care About
 
That's crazy! how to build single page web apps
That's crazy! how to build single page web appsThat's crazy! how to build single page web apps
That's crazy! how to build single page web apps
 
BrightonSEO 2019 - Edge SEO - Using CDNs To Perform SEO On The Edge
BrightonSEO 2019 - Edge SEO - Using CDNs To Perform SEO On The EdgeBrightonSEO 2019 - Edge SEO - Using CDNs To Perform SEO On The Edge
BrightonSEO 2019 - Edge SEO - Using CDNs To Perform SEO On The Edge
 

Ähnlich wie Web performance optimization for modern web applications

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
 
High Performance Ajax Applications
High Performance Ajax ApplicationsHigh Performance Ajax Applications
High Performance Ajax ApplicationsSiarhei Barysiuk
 
High performance website
High performance websiteHigh performance website
High performance websiteChamnap Chhorn
 
Why your slow loading website is costing you sales and how to fix it
Why your slow loading website is costing you sales and how to fix itWhy your slow loading website is costing you sales and how to fix it
Why your slow loading website is costing you sales and how to fix itstrommen
 
Why your slow loading website is costing you sales and how to fix it
Why your slow loading website is costing you sales and how to fix itWhy your slow loading website is costing you sales and how to fix it
Why your slow loading website is costing you sales and how to fix itRobert Flournoy
 
5 single page application principles developers need to know
5 single page application principles developers need to know5 single page application principles developers need to know
5 single page application principles developers need to knowChris Love
 
Cvcc performance tuning
Cvcc performance tuningCvcc performance tuning
Cvcc performance tuningJohn McCaffrey
 
Shopzilla - Performance By Design
Shopzilla - Performance By DesignShopzilla - Performance By Design
Shopzilla - Performance By DesignTim Morrow
 
Csdn Drdobbs Tenni Theurer Yahoo
Csdn Drdobbs Tenni Theurer YahooCsdn Drdobbs Tenni Theurer Yahoo
Csdn Drdobbs Tenni Theurer Yahooguestb1b95b
 
Performance optimization - Basics
Performance optimization - BasicsPerformance optimization - Basics
Performance optimization - BasicsFilip Mares
 
NYC WebPerf Meetup Feb 2020 - Measuring the Adoption of Web Performance Techn...
NYC WebPerf Meetup Feb 2020 - Measuring the Adoption of Web Performance Techn...NYC WebPerf Meetup Feb 2020 - Measuring the Adoption of Web Performance Techn...
NYC WebPerf Meetup Feb 2020 - Measuring the Adoption of Web Performance Techn...Paul Calvano
 
A Day Building Fast, Responsive, Extensible Single Page Applications
A Day Building Fast, Responsive, Extensible Single Page ApplicationsA Day Building Fast, Responsive, Extensible Single Page Applications
A Day Building Fast, Responsive, Extensible Single Page ApplicationsChris Love
 
Datasets, APIs, and Web Scraping
Datasets, APIs, and Web ScrapingDatasets, APIs, and Web Scraping
Datasets, APIs, and Web ScrapingDamian T. Gordon
 
Frontend performance
Frontend performanceFrontend performance
Frontend performancesacred 8
 
7 Habits of Exceptional Performance
7 Habits of Exceptional Performance7 Habits of Exceptional Performance
7 Habits of Exceptional PerformanceNicole Sullivan
 

Ähnlich wie Web performance optimization for modern web applications (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
 
High Performance Ajax Applications
High Performance Ajax ApplicationsHigh Performance Ajax Applications
High Performance Ajax Applications
 
High performance website
High performance websiteHigh performance website
High performance website
 
Why your slow loading website is costing you sales and how to fix it
Why your slow loading website is costing you sales and how to fix itWhy your slow loading website is costing you sales and how to fix it
Why your slow loading website is costing you sales and how to fix it
 
Why your slow loading website is costing you sales and how to fix it
Why your slow loading website is costing you sales and how to fix itWhy your slow loading website is costing you sales and how to fix it
Why your slow loading website is costing you sales and how to fix it
 
Making the web faster
Making the web fasterMaking the web faster
Making the web faster
 
5 single page application principles developers need to know
5 single page application principles developers need to know5 single page application principles developers need to know
5 single page application principles developers need to know
 
Cvcc performance tuning
Cvcc performance tuningCvcc performance tuning
Cvcc performance tuning
 
Shopzilla - Performance By Design
Shopzilla - Performance By DesignShopzilla - Performance By Design
Shopzilla - Performance By Design
 
Csdn Drdobbs Tenni Theurer Yahoo
Csdn Drdobbs Tenni Theurer YahooCsdn Drdobbs Tenni Theurer Yahoo
Csdn Drdobbs Tenni Theurer Yahoo
 
Performance optimization - Basics
Performance optimization - BasicsPerformance optimization - Basics
Performance optimization - Basics
 
Speed!
Speed!Speed!
Speed!
 
NYC WebPerf Meetup Feb 2020 - Measuring the Adoption of Web Performance Techn...
NYC WebPerf Meetup Feb 2020 - Measuring the Adoption of Web Performance Techn...NYC WebPerf Meetup Feb 2020 - Measuring the Adoption of Web Performance Techn...
NYC WebPerf Meetup Feb 2020 - Measuring the Adoption of Web Performance Techn...
 
A Day Building Fast, Responsive, Extensible Single Page Applications
A Day Building Fast, Responsive, Extensible Single Page ApplicationsA Day Building Fast, Responsive, Extensible Single Page Applications
A Day Building Fast, Responsive, Extensible Single Page Applications
 
performance.ppt
performance.pptperformance.ppt
performance.ppt
 
Web Performance Optimization (WPO)
Web Performance Optimization (WPO)Web Performance Optimization (WPO)
Web Performance Optimization (WPO)
 
Datasets, APIs, and Web Scraping
Datasets, APIs, and Web ScrapingDatasets, APIs, and Web Scraping
Datasets, APIs, and Web Scraping
 
Web performance
Web performanceWeb performance
Web performance
 
Frontend performance
Frontend performanceFrontend performance
Frontend performance
 
7 Habits of Exceptional Performance
7 Habits of Exceptional Performance7 Habits of Exceptional Performance
7 Habits of Exceptional Performance
 

Mehr von Chris Love

Quick Fetch API Introduction
Quick Fetch API IntroductionQuick Fetch API Introduction
Quick Fetch API IntroductionChris Love
 
Introduction to Progressive Web Applications
Introduction to Progressive Web ApplicationsIntroduction to Progressive Web Applications
Introduction to Progressive Web ApplicationsChris Love
 
Introduction to Progressive Web Applications
Introduction to Progressive Web ApplicationsIntroduction to Progressive Web Applications
Introduction to Progressive Web ApplicationsChris Love
 
Lazy load Website Assets
Lazy load Website AssetsLazy load Website Assets
Lazy load Website AssetsChris Love
 
Progressive Web Apps for Education
Progressive Web Apps for EducationProgressive Web Apps for Education
Progressive Web Apps for EducationChris Love
 
The server is dead going serverless to create a highly scalable application y...
The server is dead going serverless to create a highly scalable application y...The server is dead going serverless to create a highly scalable application y...
The server is dead going serverless to create a highly scalable application y...Chris Love
 
Real World Lessons in Progressive Web Application & Service Worker Caching
Real World Lessons in Progressive Web Application & Service Worker CachingReal World Lessons in Progressive Web Application & Service Worker Caching
Real World Lessons in Progressive Web Application & Service Worker CachingChris Love
 
Disrupting the application eco system with progressive web applications
Disrupting the application eco system with progressive web applicationsDisrupting the application eco system with progressive web applications
Disrupting the application eco system with progressive web applicationsChris Love
 
Implementing a Responsive Image Strategy
Implementing a Responsive Image StrategyImplementing a Responsive Image Strategy
Implementing a Responsive Image StrategyChris Love
 
Using Responsive Web Design To Make Your Web Work Everywhere
Using Responsive Web Design To Make Your Web Work EverywhereUsing Responsive Web Design To Make Your Web Work Everywhere
Using Responsive Web Design To Make Your Web Work EverywhereChris Love
 
Css best practices style guide and tips
Css best practices style guide and tipsCss best practices style guide and tips
Css best practices style guide and tipsChris Love
 
Using Responsive Web Design To Make Your Web Work Everywhere
Using Responsive Web Design To Make Your Web Work Everywhere Using Responsive Web Design To Make Your Web Work Everywhere
Using Responsive Web Design To Make Your Web Work Everywhere Chris Love
 
An Introduction to Microsoft Edge
An Introduction to Microsoft EdgeAn Introduction to Microsoft Edge
An Introduction to Microsoft EdgeChris Love
 
Single page applications the basics
Single page applications the basicsSingle page applications the basics
Single page applications the basicsChris Love
 
There Is No Mobile: An Introduction To Responsive Web Design
There Is No Mobile: An Introduction To Responsive Web DesignThere Is No Mobile: An Introduction To Responsive Web Design
There Is No Mobile: An Introduction To Responsive Web DesignChris Love
 
A night at the spa
A night at the spaA night at the spa
A night at the spaChris Love
 
Responsive web design
Responsive web designResponsive web design
Responsive web designChris Love
 
Developing and deploying a website with html5
Developing and deploying a website with html5Developing and deploying a website with html5
Developing and deploying a website with html5Chris Love
 

Mehr von Chris Love (20)

Quick Fetch API Introduction
Quick Fetch API IntroductionQuick Fetch API Introduction
Quick Fetch API Introduction
 
Introduction to Progressive Web Applications
Introduction to Progressive Web ApplicationsIntroduction to Progressive Web Applications
Introduction to Progressive Web Applications
 
Introduction to Progressive Web Applications
Introduction to Progressive Web ApplicationsIntroduction to Progressive Web Applications
Introduction to Progressive Web Applications
 
Lazy load Website Assets
Lazy load Website AssetsLazy load Website Assets
Lazy load Website Assets
 
Progressive Web Apps for Education
Progressive Web Apps for EducationProgressive Web Apps for Education
Progressive Web Apps for Education
 
The server is dead going serverless to create a highly scalable application y...
The server is dead going serverless to create a highly scalable application y...The server is dead going serverless to create a highly scalable application y...
The server is dead going serverless to create a highly scalable application y...
 
Real World Lessons in Progressive Web Application & Service Worker Caching
Real World Lessons in Progressive Web Application & Service Worker CachingReal World Lessons in Progressive Web Application & Service Worker Caching
Real World Lessons in Progressive Web Application & Service Worker Caching
 
Disrupting the application eco system with progressive web applications
Disrupting the application eco system with progressive web applicationsDisrupting the application eco system with progressive web applications
Disrupting the application eco system with progressive web applications
 
Implementing a Responsive Image Strategy
Implementing a Responsive Image StrategyImplementing a Responsive Image Strategy
Implementing a Responsive Image Strategy
 
Using Responsive Web Design To Make Your Web Work Everywhere
Using Responsive Web Design To Make Your Web Work EverywhereUsing Responsive Web Design To Make Your Web Work Everywhere
Using Responsive Web Design To Make Your Web Work Everywhere
 
Css best practices style guide and tips
Css best practices style guide and tipsCss best practices style guide and tips
Css best practices style guide and tips
 
Using Responsive Web Design To Make Your Web Work Everywhere
Using Responsive Web Design To Make Your Web Work Everywhere Using Responsive Web Design To Make Your Web Work Everywhere
Using Responsive Web Design To Make Your Web Work Everywhere
 
An Introduction to Microsoft Edge
An Introduction to Microsoft EdgeAn Introduction to Microsoft Edge
An Introduction to Microsoft Edge
 
Single page applications the basics
Single page applications the basicsSingle page applications the basics
Single page applications the basics
 
There Is No Mobile: An Introduction To Responsive Web Design
There Is No Mobile: An Introduction To Responsive Web DesignThere Is No Mobile: An Introduction To Responsive Web Design
There Is No Mobile: An Introduction To Responsive Web Design
 
Touch the web
Touch the webTouch the web
Touch the web
 
SPAs Are Easy
SPAs Are EasySPAs Are Easy
SPAs Are Easy
 
A night at the spa
A night at the spaA night at the spa
A night at the spa
 
Responsive web design
Responsive web designResponsive web design
Responsive web design
 
Developing and deploying a website with html5
Developing and deploying a website with html5Developing and deploying a website with html5
Developing and deploying a website with html5
 

Web performance optimization for modern web applications

  • 1. Web Performance Optimization for Modern Web Applications Chris Love @ChrisLove ProfessionalASPNET.com
  • 2. Slide Deck & Source Code Slide Deck – http://slidesha.re/SzoqKs Source Code – http://GitHub.com/docluv
  • 3. Web Performance Optimization Resources High Performance Web Sites - http://bitly.com/U7GStY Even Faster Web Sites - http://amzn.to/WTiDFM Web Performance Daybook - http://amzn.to/VV4Grz High Performance JavaScript - http://amzn.to/Sq9IFC Steve Souders - http://www.stevesouders.com/
  • 4. Web performance optimization, WPO, or website optimization involves ongoing monitoring and Web testing of websites to achieve optimum Performance performance under given constraints. Usually optimization is restricted due to lack of complete Optimization information and metrics to evaluate the performance of a website. http://bit.ly/SWEh6E
  • 5. "Also take a step back for a minute and consider the intent of this change: a faster web is great for everyone, but especially for users. Lots of websites have demonstrated that speeding up the Matt Cutts user experience results in more usage. So speeding up your website isn’t just something that can affect your search rankings–it’s a fantastic idea for your users." http://bit.ly/SPPB4k
  • 6. Time === $$$$ Faster Sites Have Higher Conversion Rates WalMart - http://bit.ly/S1fHSZ Google – http://bit.ly/WajJbB Amazon – http://bit.ly/S3UoAj ShopZilla - http://bit.ly/RIQMDM
  • 7. Folks at Walmart knew their pages were slow. As a for instance, initial measurement showed that an item page took about 24 seconds to load for the slowest 5% of users. WalMart Why? The usual culprits: too many page elements, slow third-party scripts, multiple hosts (25% of page content is served by partners, affiliates, and Marketplace), and various best practice no-nos http://bit.ly/WajJbB
  • 8.
  • 9.
  • 10. Half a second delay caused a 20% drop in traffic. ½ Second Half a second delay killed user satisfaction. Delay The lesson, Marissa said, is that speed matters. People do not like to wait. Do not make them. http://bit.ly/TPPhUp
  • 11. WPO Fast Facts • 57% Will Abandon a Slow Site After 3 Seconds • We Have to Concentrate 50% Harder For Slow Sites • 78% Have Felt Stress or Anger With Slow Sites • 44% Say Slow Sites Make Them Anxious • 4% Have Thrown Their Phone http://bit.ly/SuBLDR
  • 12. Web Sites/Apps Are Getting Larger 86 Files Requests 53 Images 1.25MB 750KB 15 JavaScript Files 14 Domains 214KB http://bit.ly/PVlLOC
  • 13. Web Sites/Apps Are Getting Larger
  • 14. We Are Getting More Mobile
  • 15. Assume Everyone is on Sprint 3G http://bit.ly/WebIqD
  • 16. And Is Using Android http://bit.ly/ZGMm4A
  • 17. YSlow Rules 1. Minimize HTTP Requests 13. Remove Duplicate Scripts 2. Use a Content Delivery Network 14. Configure ETags 3. Avoid empty src or href 15. Make AJAX Cacheable 4. Add an Expires or a Cache-Control Header 16. Use GET for AJAX Requests 5. Gzip Components 17. Reduce the Number of DOM Elements 6. Put StyleSheets at the Top 18. No 404s 7. Put Scripts at the Bottom 19. Reduce Cookie Size 8. Avoid CSS Expressions 20. Use Cookie-Free Domains for Components 9. Make JavaScript and CSS External 21. Avoid Filters 10. Reduce DNS Lookups 22. Do Not Scale Images in HTML 11. Minify JavaScript and CSS 23. Make favicon.ico Small and Cacheable 12. Avoid Redirects http://yhoo.it/W7BFIw
  • 18. YSlow Rules – That Will Play A Part Today  1. Minimize HTTP Requests 13.Remove Duplicate Scripts 2. Use a Content Delivery Network 14. Configure ETags 3. Avoid empty src or href 15. Make AJAX Cacheable 4. Add an Expires or a Cache-Control Header 16. Use GET for AJAX Requests 5. Gzip Components 17.Reduce the Number of DOM Elements 6. Put StyleSheets at the Top 18.No 404s 7. Put Scripts at the Bottom 19.Reduce Cookie Size 8. Avoid CSS Expressions 20.Use Cookie-Free Domains for Components 9. Make JavaScript and CSS External 21. Avoid Filters 10.Reduce DNS Lookups 22. Do Not Scale Images in HTML 11.Minify JavaScript and CSS 23.Make favicon.ico Small and Cacheable 12. Avoid Redirects http://yhoo.it/W7BFIw
  • 19. “Most of your scaling problems wont be Mike Krieger glamorous" http://bit.ly/QeKZsO
  • 20. Make FavIcon Small and Cacheable Don’t Return 404 Make Sure Its Compatible PNG/ICO It Carries Cookie Weight Instagram Lesson #1 http://bit.ly/RUXEiL
  • 21. Speaking Of Cookies • Cookies Add Weight • Place Resources (img/css/js) on Cookieless Domains • Consider Local Storage Instead
  • 22. Impact of Cookies on Response Time
  • 23. Use LocalStorage For Storage & Caching • Allows You to Keep Data Locally in a Hash Table • localStorage • sessionStorage • Approximately 5MB • Replace Cookies • Great For Caching
  • 24. Let’s Examine Southwest.com • 95 File Requests • 6 Domains • 2 CSS • 17 Documents • 49 Images • 30 JavaScript Files • 4 AJAX Calls • 786 KB – 1.25MB • 2042 KB Request Header • 16.5KB Cookie • 1430 DOM Elements
  • 26. Combine 19 JavaScript Files • Eliminated 18 file Requests • 42.6KB Header Data • Eliminated 18 Gzip Decompress Operations • Probably Shave ~ 1 Second
  • 27. Southwest.com Page Structure <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7"/> <link rel="shortcut icon" href="/assets/images/favicon.ico"/> <style> … </style> <script> … </script> - 22 Times Script References in the HEAD – Should be at the Bottom
  • 28. Southwest.com Improvements Over the past few months I have been analyzing Southwest.com and have seen some tremendous improvements. Data transfer size has been cut in half this week alone. I have seen the complete load time reduced around 2 seconds in the past few weeks. The number of file requests has been reduced. So many be we will be privileged to a new WPO case study soon ;)
  • 29. Let’s Look at Some Code!
  • 30. Asynchronous Script Loading • Allows You to lazy Load Scripts • Great Way to Isolate 3rd Party Scripts • Helps Avoid Single Points of Failure • Check For Existing Script Reference • Creates New Element • Executes a Callback When the Document is loaded • Appends the Script to the BODY http://bit.ly/TKdo6C
  • 31. Image Optimization Tricks • CSS Sprites • Data URIs <img src="data:image/png;base64,iVBORw0KGHAAAD…Zw4PIXZORK5CYII="/> • CSS3 Features • Rounded Corners • Gradients
  • 32. Use Native Selectors Instead of jQuery http://bit.ly/S0bwby
  • 33. Optimize CSS • Good Structure • Size • Colors • Views/Controls • Languages • Avoid ID References #

Hinweis der Redaktion

  1. In Slide Show mode, click the arrow to enter the PowerPoint Getting Started Center.
  2. In Slide Show mode, click the arrow to enter the PowerPoint Getting Started Center.
  3. In Slide Show mode, click the arrow to enter the PowerPoint Getting Started Center.