breaking the speed limit: faster websites win

25
Respond Promptly

Upload: jonathan-hochman

Post on 08-May-2015

1.494 views

Category:

Technology


1 download

DESCRIPTION

Studies have identified speed as the single most critical factor for e-commerce conversion. There are lots of changes you could make to your website, but none of them are as risk-free as increasing speed. Some people like yellow, some like blue, but nobody likes slow. This talk will explain how to measure speed, and how to make your site much faster with minimal effort.

TRANSCRIPT

Page 1: Breaking the Speed Limit: Faster Websites Win

Respond Promptly

Page 2: Breaking the Speed Limit: Faster Websites Win

MotivationGood service includes responding promptly—whether

that’s you or your web server. -Jehochman

Faster responses generate more revenue.“Most e-commerce sites rank among the slowest sites on the Internet. Amazon did a study where they identified that there is a direct relationship between page load speed and conversion rates. They found a 1 percent decrease in sales for every 0.1 second decrease in response times. Other studies have identified speed as the single most critical factor for e-commerce conversion.” (emphasis added)

-Steve Francia, Internet Evolution

Page 3: Breaking the Speed Limit: Faster Websites Win

3http://tools.pingdom.com/fpt/

Page 4: Breaking the Speed Limit: Faster Websites Win

Speed Benchmarks

• 1.5 seconds (1500 milliseconds) is acceptable• Google.com loads in 300 - 500 ms.• I prefer 1 second or faster.• Test a few times and discard any outliers.

Page 5: Breaking the Speed Limit: Faster Websites Win

The speed of light: c = 186 282 mi/secInformation never moves faster.

Albert Michelson Edward Morley Albert Einstein

Distance from Earth to Moon is 238 855 miles

Page 6: Breaking the Speed Limit: Faster Websites Win
Page 7: Breaking the Speed Limit: Faster Websites Win

SearchEngineLand.com

Page 8: Breaking the Speed Limit: Faster Websites Win

10 000 mi / c x 272 = 14.78 sec 10 000 mi / c x 275 req / 3.5 parallel req = 4.21 sec

Distance to User Impacts Response Time

Dallas

Holland

Page 9: Breaking the Speed Limit: Faster Websites Win

Content Delivery Networks (CDN)

• First load might be slow (with free service)• Caching speeds up subsequent loads

Naked Server

CDN Deployed

Page 10: Breaking the Speed Limit: Faster Websites Win
Page 11: Breaking the Speed Limit: Faster Websites Win

Hosting Matters

Linux hosting at BostonComputing.net: 1 second

Unnamed Windows hosting – same site: 12 seconds

Page 12: Breaking the Speed Limit: Faster Websites Win

Complain to the Hosting Provider

Before

After

Page 13: Breaking the Speed Limit: Faster Websites Win

Does HTML Efficiency Matter?

• A lot of people obsess about code size.• Is it worth the effort to recode for speed?

- probably not!

Page 14: Breaking the Speed Limit: Faster Websites Win
Page 15: Breaking the Speed Limit: Faster Websites Win

Ctrl-U: View Source—3052 lines!

Page 16: Breaking the Speed Limit: Faster Websites Win
Page 17: Breaking the Speed Limit: Faster Websites Win

6X Less Code—But Same Load Time. HTML Size Matters, but Not So Much.

Page 18: Breaking the Speed Limit: Faster Websites Win

Content Management Systems (CMS) and Caching

• It takes time to run PHP/Ruby/Java scripts server side. A CMS is slower than static code.

• A cache stores the script output and reuses it each time the page is requested.

• Caching cuts response times, but some types of updates might not appear instantly.

• W3 Total Cache for Wordpress http://yoast.com/w3-total-cache/

Page 19: Breaking the Speed Limit: Faster Websites Win

Cache Off / On Test

W3 Total Cache also does minification: CSS and JS files are merged, and extraneous characters are stripped from files.

Page 20: Breaking the Speed Limit: Faster Websites Win

Web Video and Speed• Asynchronous video (and AJAX) impacts page

load speed very little.• Streaming large video files from the same

server probably isn’t smart. • Wistia is a good option.

Page 21: Breaking the Speed Limit: Faster Websites Win

Speed Tactics are Cumulative

Page 22: Breaking the Speed Limit: Faster Websites Win

The Easiest Speed Wins

• Good HostingNot overloaded, properly configured server

• Content Delivery Network Place static files close to the visitors

• Simplify Design to Improve Usability and Speed 26 requests are ~10X faster than 275 requests

• Cache Plugin for CMSAlleviates time spent running server-side scripts.

• Appropriate Use of Asynchronous ContentLeverage AJAX and Video for complex content

Page 23: Breaking the Speed Limit: Faster Websites Win

Google PageSpeed™

developers.google.com/speed/pagespeed/• PageSpeed extension for Chrome and Firefox• mod_pagespeed – an open source Apache module

that speeds up serving.• Lots of details for those with time and expertise. For

people who run their own servers.• Recommendations are automated and NOT based on

actual speed. They are a start, not an end.developers.google.com/speed/pagespeed/insights

Page 24: Breaking the Speed Limit: Faster Websites Win

Further Readinghttps://developers.google.com/speed/docs/best-practices/rules_intro

• Optimizing caching — keeping your application's data and logic off the network altogether

• Minimizing round-trip times — reducing the number of serial request-response cycles

• Minimizing request overhead — reducing upload size• Minimizing payload size — reducing the size of responses,

downloads, and cached pages• Optimizing browser rendering — improving the browser's layout of

a page• Optimizing for mobile — tuning a site for the characteristics of

mobile networks and mobile devices