Intro to Web Performance Ten Ways to a Faster Website Presented by: Sheila Eaton and Mohammad Durrani TechKnowFile, University of Toronto, May 5, 2016.

Slides:



Advertisements
Similar presentations
Optimizing Websites with YSlow Tom Lianza Co-Founder Wishlisting.com Tom Lianza Co-Founder Wishlisting.com.
Advertisements

The Internet.
Building Fast 3rd-Party Webapps O'Reilly Velocity Web Performance and Operations Conference 24 June Lessons.
Introduction to Web Design Lecture number:. Todays Aim: Introduction to Web-designing and how its done. Modelling websites in HTML.
CS193H: High Performance Web Sites Lecture 12: Rule 8 – Make JavaScript and CSS External Steve Souders Google
CHAPTER 15 WEBPAGE OPTIMIZATION. LEARNING OBJECTIVES How to test your web-page performance How browser and server interactions impact performance What.
Improving Web Site Performance and Scalability While Saving Money Robert Boedigheimer ∙ Web Application
Amazon CloudFront An introductory discussion. What is Amazon CloudFront? 5/31/20122© e-Zest Solutions Ltd. Amazon CloudFront is a web service for content.
Shared-Dictionary Compression over HTTP (SDCH)‏ Wei-Hsin Lee June 2008.
Analysis and Performance Information Systems 337 Prof. Harry Plantinga.
Fast is a Feature. 11 mentions of speed in Apple iPhone 6 keynote.
Microsoft ® Official Course Developing Optimized Internet Sites Microsoft SharePoint 2013 SharePoint Practice.
High Performance Websites (Based on Steve Souder’s lecture) By Bhoomi Patel.
1 The World Wide Web. 2  Web Fundamentals  Pages are defined by the Hypertext Markup Language (HTML) and contain text, graphics, audio, video and software.
Putting the Network to Work
Web Basics (Scary Acronyms Demystified). HTML Acronyms And your website… CSS URL HTTP SSL SMTP DNS RSS API ERQ iCAL Yippie! We have an Awesome website…
Mark Phillip markphillip.com 200s, 304s, Expires Headers, HTTP Compression, And You.
Responsive Web Design, Discoverability, and Mobile Challenge
Performance, SEO, Accessibility Ivan Zhekov Telerik Corporation
Web Development 311 Fall : Fall Why web pages? Most companies have intranets, extranets, and web sites Content can be changed quickly and.
Using Multimedia on the Web
Google Confidential & Proprietary Best Practices for Reducing HTML5 File Size Q
 Internet vs WWW  Pages vs Sites  How the Internet Works  Getting a Web Presence.
Ch 5 HTML and CSS Web Standards Solutions A Web Standardistas’ Approach.
Chapter 16 The World Wide Web Chapter Goals Compare and contrast the Internet and the World Wide Web Describe general Web processing Describe several.
Server-side Scripting Powering the webs favourite services.
Making your website go faster! Front-end Developer, Deeson Online Alli Price.
CSS Sprites. What are sprites? In the early days of video games, memory for graphics was very low. So to make things load quickly and make graphics look.
Chapter 19: Adding JavaScript
CSCE Chapter 5 (Links, Images, & Multimedia) CSCE General Applications Programming Benito Mendoza 1 By Benito Mendoza Department.
Programming in HTML.  Programming Language  Used to design/create web pages  Hyper Text Markup Language  Markup Language  Series of Markup tags 
HOW WEB SERVER WORKS? By- PUSHPENDU MONDAL RAJAT CHAUHAN RAHUL YADAV RANJIT MEENA RAHUL TYAGI.
Web Performance Optimization Boban Stojanovski (Senior Front End Developer at Solaborate) Think Fast by default.
Optimizing Bandwidth Utilization Defiana Arnaldy, M.Si
(c) 2009 Facebook, Inc. or its licensors. "Facebook" is a registered trademark of Facebook, Inc.. All rights reserved. 1.0.
Optimizing Web pages Hyun Joo LEE LIS 385 T: Information Architecture and Design March 27, 2003.
PERFORMANCE ENHANCEMENT IN ASP.NET By Hassan Tariq Session #1.
Putting Performance Best Practices Together to Create the Perfect SPA Chris Love2Dev.com.
2007cs Servers on the Web. The World-Wide Web 2007 cs CSS JS HTML Server Browser JS CSS HTML Transfer of resources using HTTP.
Web Design and Development. World Wide Web  World Wide Web (WWW or W3), collection of globally distributed text and multimedia documents and files 
Restricted © Siemens AG All rights reserved A Developer’s Insights Into Performance Optimizations for Mobile Web Apps CT DC AA EM LP2 | June 2015.
The Internet. Important Terms Network Network Internet Internet WWW (World Wide Web) WWW (World Wide Web) Web page Web page Web site Web site Browser.
Qmags At The Cutting Edge of Digital Publishing. Mobile (Platform, Specification and Features) Template Elements ( Your home page will be the only unique.
1 Minification JavaScript & CSS. 2 Minification Removing 0 Whitespace 0 Line Breaks 0 Comments 0 Shrink Variables 0 Optimize Code.
FRONT END OPTIMIZATION: TRADE-OFFS YOU'RE FORCED TO MAKE BY KYLE GENTRY.
Website: Contact:
COMP 143 Web Development with Adobe Dreamweaver CC.
Site Speed: The Ultimate UX Feature… for SEO. A case study on how to increase search engine crawling and online conversion Jonathon Colman In-House SEO.
MICROSOFT AJAX CDN (CONTENT DELIVERY NETWORK) Make Your ASP.NET site faster to retrieve.
GOOGLE TAG MANAGER. INTRODUCTION Google Tag Manager (GTM) is a free solution, introduced in October Google Tag Manager (GTM) is a free solution,
Technical SEO tips for Web Developers Richa Bhatia Singsys Pte. Ltd.
IF STARBUCKS USED INSTART LOGIC, THEY WOULD HAVE A FASTER RESPONSIVE WEBSITE BY PETER BLUM.
Enhance Your Page Load Speed And Improve Traffic.
Web Analytics Fundamentals Presented by Tejaswi, Chandrika, Sunil.
OCR Computing OGAT Web Technologies. What OCR need you to know… You are expected to have a working knowledge of the above web languages.
Technology for Mobile Network Operators Business Case: Improve Overall Service Quality and Customer Experience While Dramatically Lowering Carrier Costs.
WHAT'S NEW IN HTTP/2 BY DAWN PARZYCH. The front end optimization (FEO) movement was a result of the inefficiencies of HTTP/1.1. The availability of.
Business Case: Improve Overall Service Quality and Customer Experience
3 Best Website Speed and Performance Checking Tools
Building Responsive Media for Optimal Performance
Time is the enemy: Ten Core Lessons for Achieving Peak
Information Systems 337 Prof. Harry Plantinga Assessment.
Web Caching? Web Caching:.
5 Optimization Techniques for WordPress Websites.
Tips for Website Speed Optimization
B OOST W EBSITE P ERFORMANCE WITH T HE C USTOM W ORDPRESS P LUG -I N D EVELOPMENT
Hints and tips for faster web apps
Web Development 101 Workshop
10 Tips which definitely works for boosting the website speed Technology Moon.
Yale Digital Conference 2019
Presentation transcript:

Intro to Web Performance Ten Ways to a Faster Website Presented by: Sheila Eaton and Mohammad Durrani TechKnowFile, University of Toronto, May 5, 2016

Welcome! What is Web Performance? Why is it Important? Challenges and Solutions Questions and Further Reading Agenda

What is Web Performance? Perceived Performance Optimized progressive rendering. Feels fast. Unoptimized Rendering Feels slow. developers.google.com/web/fundamentals/performance/critical-rendering-path/

Web Page Performance

Why is Performance Important? Puts users first Allows users to accomplish tasks in less than 2 seconds Respect for users builds trust Encourages return visits Reduce time and data costs for mobile users Accounts for international bandwidth Broaden access Small boost to search

Why Performance Matters 47% expect a web page to load in two seconds or less. two seconds or less 57% will abandon a page that takes 3 seconds or more to load 3 seconds or more 79% shoppers [students, faculty, donors ] who have trouble with web site performance say they won’t return to the site to buy again See Also: What does my site costWhat does my site cost

Performance Challenges CHALLENGE 1: Number of HTTP Requests CHALLENGE 2: Bigger File Sizes CHALLENGE 3 : Improving Perceived Perf. CHALLENGE 4: Latency

httparchive.org/trends.php Total Transfer Size & Total Requests

CHALLENGE 1: Number of HTTP Requests

40 requests Goal: Reduce number of requests How – some quick wins: Image svg sprites Remove Font Awesome and Google font Set one feature img each for news and events feeds Reduce size of banner Blur banner image and crop Reduce CSS* *For new USMC website (in progress) CSS is reduced by 36%

Why Reduce Requests A resource is requested Time is spent sending the request to the server and waiting for the server to respond Then downloading the response to add to webpage The less time it takes -- the better CHALLENGE 1: Number of HTTP Requests

Five Ways to Cope with Requests Resource Audit Image Sprites JS/CSS Concat Keep Alive Cache Static Files CHALLENGE 1: Number of HTTP Requests

The fastest and best optimized resource is a resource not sent Ilya Grigorik, Google CHALLENGE 1: Number of HTTP Requests > Reducing Requests

Resource Audit Question everything: css/js/images/fonts/3rd-party CHALLENGE 1: Number of HTTP Requests > Reducing Requests Resource necessary? Value to user? More performant approach? Blocking page load? Place lower in markup? How is value tracked?

Fonts Performance costs of fonts? Aesthetic tradeoffs? CHALLENGE 1: Number of HTTP Requests > Reducing Requests Google Sans and Merriweather Bold, normal, italic Performance Hit 194 Arial and Times New Roman All weights No Performance Hit

Image Sprites Size of file is bigger but fewer http requests CHALLENGE 1: Number of HTTP Requests > Reducing Requests

JS/CSS Concat What is concat? Combining like files to reduce the number of HTTP requests

CHALLENGE 1: Number of HTTP Requests > Reducing Requests JS/CSS Concat File1.js { //content file 1 } FileAll.js { //content file 1 //content file 2 //content file 3 } File2.js { //content file 2 } File3.js { //content file 3 }

CHALLENGE 1: Number of HTTP Requests > Reducing Requests Keep Alive

CHALLENGE 1: Number of HTTP Requests > Reducing Requests Caching Static Files Assets don’t change often (css, images, js) Reduce number of requests by storing assets on client’s machine for a defined period of time Not spending time fetching resources Will only affect subsequent visits Test with webpagetest.org

CHALLENGE 2: Bigger File Sizes

Why Reduce Size of Resources Smaller the resource = the faster it will load Get files to the browser as fast as possible so it can start building the page CHALLENGE 2: Bigger File Sizes

Three Ways to Reduce File Sizes Images Right Size Right Format Compression Minification Gzip CHALLENGE 2: Bigger File Sizes

Image Compression Images count for just over 63% of page weight CHALLENGE 2: Bigger File Sizes > Reducing File Sizes > Images

Choosing the right file format CHALLENGE 2: Bigger File Sizes > Reducing File Sizes > Images

Serving the right size CHALLENGE 2: Bigger File Sizes > Reducing File Sizes > Images Don’t serve a 500x500 image intended as a 150x150 thumbnail

Image Compression Caveat: Strips meta data CHALLENGE 2: Bigger File Sizes > Reducing File Sizes > Images Lossless compression allows original image to be perfectly reconstructed from compressed data. Lossy compression reconstructs an approximation of original data

Image Compression CHALLENGE 2: Bigger File Sizes > Reducing File Sizes > Images 69% savings (right) in compressed png. No perceptual difference in quality. tinypng.com/

Image Compression CHALLENGE 2: Bigger File Sizes > Reducing File Sizes > Images Tools Popular web tools Plugins for wp/drupal Task runners

Minification HTML/CSS/JS Dev Code Human readability, comments, whitespace Minified Code Remove extra characters, comments, whitespace CHALLENGE 2: Bigger File Sizes > Reducing File Sizes > Minification

Minified: 150 characters. Reduced by 63% Source: Google Dev Development: 406 Characters

Minification HTML/CSS/JS Context Matters HTML tags Combining CSS rules CHALLENGE 2: Bigger File Sizes > Reducing File Sizes > Minification

Minification HTML/CSS/JS Tools Web based Task runner Plugins for CMS CHALLENGE 2: Bigger File Sizes > Reducing File Sizes > Minification

GZIP Can be applied to any type of data Performs best on text-based assets: css, js, html Compression rates 70-90% for larger files. Little to no benefit for images Modern browsers support GZIP compression CHALLENGE 2: Bigger File Sizes > Reducing File Sizes > GZIP

GZIP Implementation depends on server configuration. Ask your host Apache can be done via.htaccess CHALLENGE 2: Bigger File Sizes > Reducing File Sizes > GZIP

GZIP CHALLENGE 2: Bigger File Sizes > Reducing File Sizes > GZIP LibrarySizeCompressed size Compression ratio jquery js 276 KB 82 KB 70% jquery min.js 94 KB 33 KB 65% angular js 729 KB 182 KB 75% angular min.js 101 KB 37 KB 63% bootstrap css 118 KB 18 KB 85% bootstrap min.css 98 KB 17 KB 83% foundation-5.css 186 KB 22 KB 88% foundation-5.min.css 146 KB 18 KB 88%

Reducing Page Weight Notes We talked about image and text compression Do an audit of the different content types you serve your clients and consider what kinds of content-specific optimizations you can apply PDFs, Audio, Video can be compressed too! CHALLENGE 2: Bigger File Sizes > Reducing File Sizes

CHALLENGE 3: Improving Perceived Performance

How we load resources matters just as much as how many resources we’re loading. ​ Scott Jehl, Filament Group CHALLENGE 3: Improving Perceived Performance

What is it? Techniques used so far improve total load time Perceived performance is more important to user experience “Critical” content loaded first CHALLENGE 3: Improving Perceived Performance

What is critical? Above the fold CHALLENGE 3: Improving Perceived Performance

Two Ways to Improve Perceived Performance Deferring non-critical JS/CSS Identifying critical css – automated tools Identifying critical js – done manually Lazy Loading below the fold images CHALLENGE 3: Improving Perceived Performance

What is critical? Above the fold CHALLENGE 3: Improving Perceived Performance

CHALLENGE 4: Latency

What is it? CHALLENGE 4: Latency

CDN CHALLENGE 4: Latency

How does a CDN work? CHALLENGE 4: Latency

Summary Reducing Number of HTTP Requests Resource Audit Image Sprites JS/CSS Concat Keep Alive Cache static files Managing Bigger File Sizes Image Compression Minification GZIP Improving Perceived Perf Defer non-critical Lazy Loading Latency CDN

Improve. Test. Repeat.

Further Reading Page Speed and Dev Tools tools.pingdom.com/fpt/ developers.google.com/speed/ pagespeed/insights/ developers.google.com/speed/ pagespeed/insights/ Additional Reference developers.google.com/web/ fundamentals/performance/ developers.google.com/web/ fundamentals/performance/ gtmetrix.com/why-use-a-cdn.html varvy.com/pagespeed/ performance-rwd.html performance-rwd.html and-js.html and-js.html v=whGwm0Lky2s v=whGwm0Lky2s Builtwith.com What Your Site Costs Users timkadlec.com/2015/03/ what-your-site-costs/ timkadlec.com/2015/03/ what-your-site-costs/ whatdoesmysitecost.com/ Sprites / Image Compression Grumpicon / Grunticon GrumpiconGrunticon Spritecow tinypng.com Performance Budgets Tim Kadlec tinyurl.com/hqywuk5tinyurl.com/hqywuk5 Etsy codeascraft.com/codeascraft.com/ Smashing Mag tinyurl.com/haghregtinyurl.com/haghreg HTML5 Rocks features/performancewww.html5rocks.com/en/ features/performance Brad Frost Perf Budget Builder bradfrost.com/blog/post/performance-budget- builder/ bradfrost.com/blog/post/performance-budget- builder/

Thank You! Questions?