Webdev Best
 Practices
   Al Torreno
Website Peformance
Fast enough?
"Everyone is on High Speed"
From webperformancetoday.com
Shopzilla
• Reduced avg page load time from 6s to 1.2s, increased
  revenue by 12% and page views by 25%
Amazon


• Increased revenue by 1% for every
  100ms improvement
Yahoo!


• Increased traffic by 9% for
  every 400ms improvement
Page Performance
• Bandwidth is NOT the only bottleneck to
  website performance
• Bandwidth is NOT the only bottleneck to
  website performance

• Improvements to performance = increased
  traffic + revenue
Corp
AFKLM login: 20 requests, 960.7 KB, 1.68s
  AA login: 24 requests, 951.7 KB, 1.94s
PdC
  homepage: 45 requests, 802.8 KB, 2.08s
  login page: 29 requests, 860.9 KB, 1.87s
landing page: 100 requests, 329.2 KB, 4.67s
eBGT
  Hyatt Buy MV:50 requests, 544.1 KB, 2.8s
JetBlue Buy MV: 61 requests, 642.1 KB, 4.83s
How do we compare?
Page Performance
Page Performance
Page Performance
Page Performance
Homepage Requests   Payload   Load
  Corp      20       960K     1.71s
  eBGT      50       544K      2.8s
  PdC       45       802K      2.1s
 Amazon     45       288K     1.63s
 Apple      43       1.1M     1.27s
Facebook    15       162K     0.772s
 Google      8       157K     0.672s
Okay, but how?
Steve Souders
  Web performance guru
optimize front-end performance first, that's
where 80% or more of the end-user response
time is spent.
Page Performance
Page Performance
Online Resources
Online Resources


• Google Page Speed
Online Resources


• Google Page Speed

• Yahoo Exceptional Performance
The Tools
Firebug net panel
Google Page Speed
Google Page Speed

• Plugin for FF and Chrome
Google Page Speed

• Plugin for FF and Chrome

• Analyzes and grades page
Google Page Speed

• Plugin for FF and Chrome

• Analyzes and grades page

• Checks against best practices
Google Page Speed

• Plugin for FF and Chrome

• Analyzes and grades page

• Checks against best practices

• Provides recommendations
Page Performance
Page Performance
Site       Score (100)
 Corp (AA)         74
    PdC            63
eBGT (Hyatt)       83
   Apple           80
  Amazon           93
 Facebook          98
  Google          100
First, some
terminology
http Waterfall
Parallel loading


• According to the http 1.1 spec, a single-user
  client SHOULD NOT maintain more than 2
  connections with a single hostname.
Scripts block parallel downloads
Scripts block parallel downloads
http Waterfall
Minimize http requests
Minimize http requests
Minimize http requests

• Combine js into a single file
Minimize http requests

• Combine js into a single file

• Combine CSS into a single file
Minimize http requests

• Combine js into a single file

• Combine CSS into a single file

• Combine images into a sprite
Sprites
Sprites
<div class="error">Oh gawd</div>

<h1>Lorem Ipsum</h1>

.error{background:url(sprite.png)
no-repeat 0 -300px}

h1{background:url(sprite.png) no-
repeat 0 -250px}
Page Performance
Page Performance
Round up
Round up


• Minimize redirects
Round up


• Minimize redirects

• Remove bad requests (aka 404)
Questions?
Reduce payload
Reduce payload


• Minify js and css
Reduce payload


• Minify js and css

• gzip
Reduce payload


• Minify js and css

• gzip

• Optimize/compress graphics
Parallelize downloads
   across multiple
       domains
Parallel loading


• According to the http 1.1 spec, a single-user
  client SHOULD NOT maintain more than 2
  connections with a single hostname.
So, let's load assets
from multiple hosts
Page Performance
• dynamic content from buy.points.com
• dynamic content from buy.points.com

• images from static1.points.com and
  static2.points.com
• dynamic content from buy.points.com

• images from static1.points.com and
  static2.points.com

• in IE6, 6 parallel downloads
• dynamic content from buy.points.com

• images from static1.points.com and
  static2.points.com

• in IE6, 6 parallel downloads

• in FF5, 18 parallel downloads
• dynamic content from buy.points.com

• images from static1.points.com and
  static2.points.com

• in IE6, 6 parallel downloads

• in FF5, 18 parallel downloads

• FTW
Questions?
Optimize Caching
Optimize Caching

• Doesn't help us with speed of initial page

• Helps with speed of subsequent pages /
  subsequent visits
Caching 101
Caching 101

• Homepage, first visit: Must request all static
  resources.
Caching 101

• Homepage, first visit: Must request all static
  resources.

• Images/CSS/JS/etc stored in browser cache
Caching 101

• Homepage, first visit: Must request all static
  resources.

• Images/CSS/JS/etc stored in browser cache

• Subsequent visits: Browser (somehow)
  determines whether to reuse cached version
  or re-request asset
Conditional GET

• browser: "I've got this asset in my cache, is it
  the most up-to-date?!"

• server: "yup, it's good (304)"

• Or

• server: "no, here's a more up-to-date version"
Response headers
Expires

Cache-Control:max-age

Last-modified

Etag
Gotcha
Gotcha

• If none of these response headers are set, the
  browser must determine if it can use the
  cached version
Gotcha

• If none of these response headers are set, the
  browser must determine if it can use the
  cached version

• Unnecessarily re-requesting static assets
  makes website slower
Gotcha

• If none of these response headers are set, the
  browser must determine if it can use the
  cached version

• Unnecessarily re-requesting static assets
  makes website slower

• Conditional GETs still take up http requests
Aggressively cache all
  static resources
Response headers
Expires

Cache-Control:max-age

Last-modified

Etag
Use fingerprinting when a
 static resource needs to
          change
Fingerprinting


<script src="coolmenu.js"></script>
Fingerprinting


<script src="coolmenu_v2.js"></
script>
Scripts block
progressive rendering
Page Performance
Page Performance
Page Performance
Page Performance
Page Performance
Page Performance
Page Performance
Page Performance
Provides user
   feedback
"Did this website crash my browser?"
Improves perceived speed
Scripts at the bottom
Stylesheets up top



Scripts at the bottom
<html>

<head>

</head>

<body>

</body>

</html>
<html>

<head>

</head>

<body>

</body>

</html>
<html>

<head>

</head>

<body>

</body>

</html>
No inline anything
No inline anything
No inline anything

• No inline styles
No inline anything

• No inline styles

• No inline scripts
No inline anything

• No inline styles

• No inline scripts

• blocks progressive rendering
No inline anything

• No inline styles

• No inline scripts

• blocks progressive rendering

• blocks parallel downloads
LABjs

• Framework for asynchronous load of
  javascript

• Able to load js files in parallel

• Ensures proper execution order
LABjs in action
LABjs in action

• Onboarding for IcelandAir
LABjs in action

• Onboarding for IcelandAir

• Lots of javascript
LABjs in action

• Onboarding for IcelandAir

• Lots of javascript

• Their homepage: 32 requests, 795.6 KB,
  12.42s
LABjs in action

• Onboarding for IcelandAir

• Lots of javascript

• Their homepage: 32 requests, 795.6 KB,
  12.42s

• eBGT Buy MV: 30 requests, 721.4 KB, 2.69s
Evil

• css expressions

• iframes

• document.write()
Cookies 101
GET /resources/images/pdc/
signupLogin/Background_Shadow.gif
HTTP/1.1

Host: www.points.com

User-Agent: Mozilla/5.0 (Windows;
U; Windows NT 6.1; en-US;

Referer: https://www.points.com/
Gotcha
Cookies are sent with every http request
Serve static resources
  from a cookieless
       domain
      e.g. images.points.com
Reduce DNS lookups
     i.e. Don't go overboard
Reduce DNS lookups
Reduce DNS lookups
• ajax.googleapis.com
Reduce DNS lookups
• ajax.googleapis.com

• buy.points.com
Reduce DNS lookups
• ajax.googleapis.com

• buy.points.com

• images1.points.com
Reduce DNS lookups
• ajax.googleapis.com

• buy.points.com

• images1.points.com

• images2.points.com
Reduce DNS lookups
• ajax.googleapis.com

• buy.points.com

• images1.points.com

• images2.points.com

• s3.aws.amazon.com
DNS lookups are expensive
Resources
• Google page speed :
• code.google.com/speed/page-speed/

• Yahoo exceptional performance
• developer.yahoo.com/performance/

• Steve Souders blog
• stevesouders.com/blog/

• LABjs
• labjs.com

More Related Content

PDF
"Turbo boost your website" aka BigPipe at Webinale 2014 in Berlin
PPTX
Velocity NY 2013 - From Slow to Fast: Improving Performance on Intuit Website...
PDF
Building faster websites: web performance with WordPress
PDF
Hyper-Lightweight Websites
PDF
High Performance Websites
PPTX
Html5 shubelal
PPTX
WordPress Performance 101
PPTX
Orlando DNN Usergroup Pres 12/06/11
"Turbo boost your website" aka BigPipe at Webinale 2014 in Berlin
Velocity NY 2013 - From Slow to Fast: Improving Performance on Intuit Website...
Building faster websites: web performance with WordPress
Hyper-Lightweight Websites
High Performance Websites
Html5 shubelal
WordPress Performance 101
Orlando DNN Usergroup Pres 12/06/11

What's hot (20)

PPT
Web前端性能分析工具导引
PDF
AD1387: Outside The Box: Integrating with Non-Domino Apps using XPages and Ja...
PPTX
BTV PHP - Building Fast Websites
PPTX
เพาเวอร์พอย Wordpress3 5-1
PDF
Performance scalability brandonlyon
PPT
Make Drupal Run Fast - increase page load speed
PPTX
Hyper-V Dynamic Memory in Depth
PDF
Mobile Web Best Practices
PDF
23 Ways To Speed Up WordPress
PDF
Navigating SAP’s Integration Options (Mastering SAP Technologies 2013)
PDF
A Look at the Performance of SAP's Modern UIs
PDF
Recipes for the Perfect PI v2.0
PDF
Best practices-wordpress-enterprise
PDF
PAC 2019 virtual Mark Tomlinson
PDF
Presentation on Instant page speed optimization
PDF
Optimizing WordPress for Performance - WordCamp Houston
PPTX
Improving Performance on Magento 1*
PDF
Optimizing wp
PPTX
Fastandbeautiful yglf
PDF
MySQL Enterprise Backup: Better Very Large Database Backup & Recovery and More!!
Web前端性能分析工具导引
AD1387: Outside The Box: Integrating with Non-Domino Apps using XPages and Ja...
BTV PHP - Building Fast Websites
เพาเวอร์พอย Wordpress3 5-1
Performance scalability brandonlyon
Make Drupal Run Fast - increase page load speed
Hyper-V Dynamic Memory in Depth
Mobile Web Best Practices
23 Ways To Speed Up WordPress
Navigating SAP’s Integration Options (Mastering SAP Technologies 2013)
A Look at the Performance of SAP's Modern UIs
Recipes for the Perfect PI v2.0
Best practices-wordpress-enterprise
PAC 2019 virtual Mark Tomlinson
Presentation on Instant page speed optimization
Optimizing WordPress for Performance - WordCamp Houston
Improving Performance on Magento 1*
Optimizing wp
Fastandbeautiful yglf
MySQL Enterprise Backup: Better Very Large Database Backup & Recovery and More!!
Ad

Similar to Page Performance (20)

PPTX
10 things you can do to speed up your web app today stir trek edition
PPTX
Why your slow loading website is costing you sales and how to fix it
PPTX
Why your slow loading website is costing you sales and how to fix it
PPT
performance.ppt
PPT
腾讯大讲堂09 如何建设高性能网站
PPTX
10 Things You Can Do to Speed Up Your Web App Today
PPTX
Life in the Fast Lane: Speed, Usability & Search Engine Optimization
ODP
Cvcc performance tuning
PPT
腾讯大讲堂09 如何建设高性能网站
PPT
腾讯大讲堂09 如何建设高性能网站
PDF
High performance website
PPTX
Website Performance
PDF
Web Performance Optimization (WPO)
PDF
Speed Matters
PPT
Tips for a Faster Website
PDF
20 tips for website performance
PPTX
SenchaCon Roadshow Irvine 2017
PDF
Optimizing WordPress Performance
PPT
Generating the Server Response: HTTP Status Codes
PPT
High Performance Websites By Souders Steve
10 things you can do to speed up your web app today stir trek edition
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
performance.ppt
腾讯大讲堂09 如何建设高性能网站
10 Things You Can Do to Speed Up Your Web App Today
Life in the Fast Lane: Speed, Usability & Search Engine Optimization
Cvcc performance tuning
腾讯大讲堂09 如何建设高性能网站
腾讯大讲堂09 如何建设高性能网站
High performance website
Website Performance
Web Performance Optimization (WPO)
Speed Matters
Tips for a Faster Website
20 tips for website performance
SenchaCon Roadshow Irvine 2017
Optimizing WordPress Performance
Generating the Server Response: HTTP Status Codes
High Performance Websites By Souders Steve
Ad

Recently uploaded (20)

PPT
Galois Field Theory of Risk: A Perspective, Protocol, and Mathematical Backgr...
PDF
Accessing-Finance-in-Jordan-MENA 2024 2025.pdf
PPTX
Custom Battery Pack Design Considerations for Performance and Safety
PDF
The influence of sentiment analysis in enhancing early warning system model f...
PPTX
Microsoft Excel 365/2024 Beginner's training
PDF
Taming the Chaos: How to Turn Unstructured Data into Decisions
PPTX
AI IN MARKETING- PRESENTED BY ANWAR KABIR 1st June 2025.pptx
PPTX
TEXTILE technology diploma scope and career opportunities
PDF
“A New Era of 3D Sensing: Transforming Industries and Creating Opportunities,...
PDF
Early detection and classification of bone marrow changes in lumbar vertebrae...
PDF
OpenACC and Open Hackathons Monthly Highlights July 2025
PDF
Comparative analysis of machine learning models for fake news detection in so...
PDF
Transform-Your-Supply-Chain-with-AI-Driven-Quality-Engineering.pdf
PPTX
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
PDF
The-2025-Engineering-Revolution-AI-Quality-and-DevOps-Convergence.pdf
PDF
NewMind AI Weekly Chronicles – August ’25 Week III
PDF
sbt 2.0: go big (Scala Days 2025 edition)
PPTX
Build Your First AI Agent with UiPath.pptx
PDF
5-Ways-AI-is-Revolutionizing-Telecom-Quality-Engineering.pdf
DOCX
search engine optimization ppt fir known well about this
Galois Field Theory of Risk: A Perspective, Protocol, and Mathematical Backgr...
Accessing-Finance-in-Jordan-MENA 2024 2025.pdf
Custom Battery Pack Design Considerations for Performance and Safety
The influence of sentiment analysis in enhancing early warning system model f...
Microsoft Excel 365/2024 Beginner's training
Taming the Chaos: How to Turn Unstructured Data into Decisions
AI IN MARKETING- PRESENTED BY ANWAR KABIR 1st June 2025.pptx
TEXTILE technology diploma scope and career opportunities
“A New Era of 3D Sensing: Transforming Industries and Creating Opportunities,...
Early detection and classification of bone marrow changes in lumbar vertebrae...
OpenACC and Open Hackathons Monthly Highlights July 2025
Comparative analysis of machine learning models for fake news detection in so...
Transform-Your-Supply-Chain-with-AI-Driven-Quality-Engineering.pdf
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
The-2025-Engineering-Revolution-AI-Quality-and-DevOps-Convergence.pdf
NewMind AI Weekly Chronicles – August ’25 Week III
sbt 2.0: go big (Scala Days 2025 edition)
Build Your First AI Agent with UiPath.pptx
5-Ways-AI-is-Revolutionizing-Telecom-Quality-Engineering.pdf
search engine optimization ppt fir known well about this

Page Performance

Editor's Notes