Understanding HTTP & Web Performance

62
Understanding HTTP & Web Performance COLLIDE HALIFAX - OCTOBER 22, 2015

Transcript of Understanding HTTP & Web Performance

Page 1: Understanding HTTP & Web Performance

Understanding HTTP &Web Performance

COLLIDE HALIFAX - OCTOBER 22, 2015

Page 2: Understanding HTTP & Web Performance

Welcome.

Page 3: Understanding HTTP & Web Performance

Luke DeWitt

WEB TEAM LEAD

Mike Rudolph

DEFINITELY NOT A COP

Who are these guys?

Page 4: Understanding HTTP & Web Performance
Page 5: Understanding HTTP & Web Performance

Immediacy of Now

Page 6: Understanding HTTP & Web Performance
Page 7: Understanding HTTP & Web Performance
Page 8: Understanding HTTP & Web Performance
Page 9: Understanding HTTP & Web Performance
Page 10: Understanding HTTP & Web Performance

Immediacy of Now

Page 11: Understanding HTTP & Web Performance

JAKOB NIELSEN 1993 STUDY

Response Times

source: http://www.nngroup.com/articles/response-times-3-important-limits/

0.1second “Instantaneous Reaction”

1second “Uninterrupted Flow of Thought”

10seconds “User’s Attention”

Page 12: Understanding HTTP & Web Performance

SQUIRREL!!!

Page 13: Understanding HTTP & Web Performance

Show of hands…

Page 14: Understanding HTTP & Web Performance
Page 15: Understanding HTTP & Web Performance

47%

40%

7%

KISSMETRICS

What a slow site means…

of users expect your site to load in 2 seconds or less

of users abandon a site at 3 seconds

reduction in conversions for every additional second of load time

sources: https://blog.kissmetrics.com/loading-time/, https://blog.kissmetrics.com/speed-is-a-killer/

Page 16: Understanding HTTP & Web Performance

Why I’m Important

Page 17: Understanding HTTP & Web Performance

Hypertext Transfer Protocol (HTTP)An application protocol for distributed, collaborative, hypermedia information systems.

Transmission Control Protocol (TCP)Enables two hosts to establish a connection and exchange streams of data.

Page 18: Understanding HTTP & Web Performance
Page 19: Understanding HTTP & Web Performance

The Speed Index

Page 20: Understanding HTTP & Web Performance

– https://sites.google.com/a/webpagetest.org/docs/using-webpagetest/metrics/speed-index

“The Speed Index is the average time at which visible parts of the

page are displayed. It is expressed in milliseconds and dependent on

the size of the view port.”

Page 21: Understanding HTTP & Web Performance

Halfway through loading my site, how much content is rendered for

my user to view?

Page 22: Understanding HTTP & Web Performance

The Test

Page 23: Understanding HTTP & Web Performance
Page 24: Understanding HTTP & Web Performance

WebPagetest Filmstrip View3000ms (3 seconds) into page load

www.webpagetest.org

Page 25: Understanding HTTP & Web Performance

WebPagetest Filmstrip View7000ms (7 seconds) into page load

www.webpagetest.org

Page 26: Understanding HTTP & Web Performance
Page 27: Understanding HTTP & Web Performance

– https://sites.google.com/a/webpagetest.org/docs/using-webpagetest/metrics/speed-index

“The Speed Index is the average time at which visible parts of the

page are displayed. It is expressed in milliseconds and dependent on

the size of the view port.”

Page 28: Understanding HTTP & Web Performance
Page 29: Understanding HTTP & Web Performance
Page 30: Understanding HTTP & Web Performance
Page 31: Understanding HTTP & Web Performance
Page 32: Understanding HTTP & Web Performance

Components of anHTTP Request

– Chapter 10. Primer on Web Performance

Page 33: Understanding HTTP & Web Performance
Page 34: Understanding HTTP & Web Performance

Components of anHTTP Request

– Chapter 10. Primer on Web Performance

Page 35: Understanding HTTP & Web Performance

TCP Handshake

– Chapter 2. Building Blocks of TCP

Page 36: Understanding HTTP & Web Performance
Page 37: Understanding HTTP & Web Performance

TCP Handshake

– Chapter 2. Building Blocks of TCP

Page 38: Understanding HTTP & Web Performance

TCP Slow-start

– Chapter 2. Building Blocks of TCP

Page 39: Understanding HTTP & Web Performance

14K 28K 56k 112K

Page 40: Understanding HTTP & Web Performance

Wuts up Luke!

Page 41: Understanding HTTP & Web Performance

Let’s Do It!

Page 42: Understanding HTTP & Web Performance

Critical Path CSS

Page 43: Understanding HTTP & Web Performance
Page 44: Understanding HTTP & Web Performance

Image Optimizations

Page 45: Understanding HTTP & Web Performance

SVGsScalable Vector Graphics

Page 46: Understanding HTTP & Web Performance

Image Compression

TinyPNGhttps://tinypng.com

Page 47: Understanding HTTP & Web Performance

1.7MB 305.9kb

Image Compression

-82%

Page 48: Understanding HTTP & Web Performance

Responsive Images

Page 49: Understanding HTTP & Web Performance

Lazy Loading Images

Page 50: Understanding HTTP & Web Performance

Font Caching

Page 51: Understanding HTTP & Web Performance
Page 52: Understanding HTTP & Web Performance

JavascriptOptimizations

Page 53: Understanding HTTP & Web Performance

Render BlockingLOADED IN

<head>

LOADED BEFORE

</body>

Page 54: Understanding HTTP & Web Performance

Minify / Concatenate

Fewer requestsLess bandwidth

Page 55: Understanding HTTP & Web Performance

Minify / Concatenate

Grunthttp://gruntjs.com

Gulphttp://gulpjs.com

CodeKithttps://incident57.com/codekit/

Page 56: Understanding HTTP & Web Performance

Content Delivery Network

Page 57: Understanding HTTP & Web Performance
Page 58: Understanding HTTP & Web Performance

DNS Prefetch

Page 59: Understanding HTTP & Web Performance

File CompressionGzip

Page 60: Understanding HTTP & Web Performance

Wrapping up…

Page 61: Understanding HTTP & Web Performance

Questions?

redspace.com / T (902) 444.3490 FACEBOOK REDspaceTWITTER @theREDspaceLINKEDIN The REDspace

LUKE DEWITT @whatadewittMIKE RUDOLPH @mikerudolph_

Page 62: Understanding HTTP & Web Performance

Thank You!

Oh, by the way, we’re hiring! http://redspace.recruiterbox.com