site speed 101: how to get your site to load in 1 second or less

45
© 2015 Eighty & Eight dba dustina LLC. Creative Commons Attribution 4.0 License.

Upload: dustin-nay

Post on 23-Jan-2017

221 views

Category:

Software


1 download

TRANSCRIPT

Page 1: Site Speed 101: How to Get Your Site to Load in 1 Second or Less

© 2015 Eighty & Eight dba dustina LLC. Creative Commons Attribution 4.0 License.

Page 2: Site Speed 101: How to Get Your Site to Load in 1 Second or Less

© 2015 Eighty & Eight dba dustina LLC. Creative Commons Attribution 4.0 License.

Site Speed 101:How to Get Your Site to Load in 1 Second or Less

Page 3: Site Speed 101: How to Get Your Site to Load in 1 Second or Less

© 2015 Eighty & Eight dba dustina LLC. Creative Commons Attribution 4.0 License.

Page 4: Site Speed 101: How to Get Your Site to Load in 1 Second or Less

© 2015 Eighty & Eight dba dustina LLC. Creative Commons Attribution 4.0 License.

Average Site Speed

6.7 seconds on desktop10.2 seconds on mobile

* source

Page 5: Site Speed 101: How to Get Your Site to Load in 1 Second or Less

© 2015 Eighty & Eight dba dustina LLC. Creative Commons Attribution 4.0 License.

Google Recommends:

1 second on all devices….

Page 6: Site Speed 101: How to Get Your Site to Load in 1 Second or Less

© 2015 Eighty & Eight dba dustina LLC. Creative Commons Attribution 4.0 License.

Page 7: Site Speed 101: How to Get Your Site to Load in 1 Second or Less

© 2015 Eighty & Eight dba dustina LLC. Creative Commons Attribution 4.0 License.

While [Google] noted at the time that...a small percentage of sites would see a significant change in ranking or traffic due to page speed factors, I find it likely that the emphasis will increase over time…. ...Having given webmasters fair notice...it’s reasonable to expect them to phase in greater emphasis until they feel that most of their top results deliver a high level of performance.

- Roger Dooley ….

Page 8: Site Speed 101: How to Get Your Site to Load in 1 Second or Less

© 2015 Eighty & Eight dba dustina LLC. Creative Commons Attribution 4.0 License.

Page 9: Site Speed 101: How to Get Your Site to Load in 1 Second or Less

© 2015 Eighty & Eight dba dustina LLC. Creative Commons Attribution 4.0 License.

Site Speed Boosts Conversion• Amazon saw 1% drop for every

100 ms increase in load time

• For Walmart, conversions doubled from 3 second load time to 1 second

• Google saw 20% decrease in search traffic with ½ second increase in load time

• Shopzilla saw 12% increase in conversions between faster and slower pages

• Mozilla saw 15.4% increase in Firefox downloads in an A/B test with speed as the only variant

• Microsoft saw .7% increase in traffic after enabling progressive rendering on Bing search pages

Page 10: Site Speed 101: How to Get Your Site to Load in 1 Second or Less

© 2015 Eighty & Eight dba dustina LLC. Creative Commons Attribution 4.0 License.

Page 11: Site Speed 101: How to Get Your Site to Load in 1 Second or Less

© 2015 Eighty & Eight dba dustina LLC. Creative Commons Attribution 4.0 License.

In Summary:• Site speed is crucial to• Search rankings• User experience (branding)• Conversion

All of these reasons mean money. Convinced?

Page 12: Site Speed 101: How to Get Your Site to Load in 1 Second or Less

© 2015 Eighty & Eight dba dustina LLC. Creative Commons Attribution 4.0 License.

Page 13: Site Speed 101: How to Get Your Site to Load in 1 Second or Less

© 2015 Eighty & Eight dba dustina LLC. Creative Commons Attribution 4.0 License.

Let’s get started

Page 14: Site Speed 101: How to Get Your Site to Load in 1 Second or Less

© 2015 Eighty & Eight dba dustina LLC. Creative Commons Attribution 4.0 License.

1. Take your web hosting seriously• Avoid shared hosting• Nginx outperforms Apache• Hosts running newer versions of PHP are faster (5.6!)• Use a dedicated host for your CMS• Most dedicated hosts have built-in redundancies for traffic spikes,

CDN and caching• VPS• Use a CDN

Page 15: Site Speed 101: How to Get Your Site to Load in 1 Second or Less

© 2015 Eighty & Eight dba dustina LLC. Creative Commons Attribution 4.0 License.

I JUST CANNAE DO IT!I DINNAE HAVE THE POWER!

Page 16: Site Speed 101: How to Get Your Site to Load in 1 Second or Less

© 2015 Eighty & Eight dba dustina LLC. Creative Commons Attribution 4.0 License.

• Your configuration depends on your CMS and requirements• Consult a qualified system administrator

• Consider Nginx• Use PHP-FPM (and FastCGI if using Apache)•Make sure you have server caching setup•Many WordPress caching plugins can actually slow down

your site• Enable gzip compression (talk to your web host)

2. Optimize your server

Page 17: Site Speed 101: How to Get Your Site to Load in 1 Second or Less

© 2015 Eighty & Eight dba dustina LLC. Creative Commons Attribution 4.0 License.

Page 18: Site Speed 101: How to Get Your Site to Load in 1 Second or Less

© 2015 Eighty & Eight dba dustina LLC. Creative Commons Attribution 4.0 License.

3. Image Compression• Proper file type

• Minimize use of .gif

• Use “Save for Web” in Photoshop, Illustrator, or the “Save for Web” extension for GIMP

• Other tools can help improve image compression

Page 19: Site Speed 101: How to Get Your Site to Load in 1 Second or Less

© 2015 Eighty & Eight dba dustina LLC. Creative Commons Attribution 4.0 License.

Some Automatic Compression Tools• TinyPng• Compressnow• Compressor.io• JPEG-Optimizer• Image Optimizer

Page 20: Site Speed 101: How to Get Your Site to Load in 1 Second or Less

© 2015 Eighty & Eight dba dustina LLC. Creative Commons Attribution 4.0 License.

If you’re adventurous…• jpegtran• gifsicle• optipng• pngquant• webp

Page 21: Site Speed 101: How to Get Your Site to Load in 1 Second or Less

© 2015 Eighty & Eight dba dustina LLC. Creative Commons Attribution 4.0 License.

Page 22: Site Speed 101: How to Get Your Site to Load in 1 Second or Less

© 2015 Eighty & Eight dba dustina LLC. Creative Commons Attribution 4.0 License.

Truly Automatic Compression Tools• WP Smushit

• EWWW Image Optimizer

• Kraken.io

Page 23: Site Speed 101: How to Get Your Site to Load in 1 Second or Less

© 2015 Eighty & Eight dba dustina LLC. Creative Commons Attribution 4.0 License.

The Best Image Compression Option:

• Manual compression in Photoshop, Illustrator, or GIMP

Page 24: Site Speed 101: How to Get Your Site to Load in 1 Second or Less

© 2015 Eighty & Eight dba dustina LLC. Creative Commons Attribution 4.0 License.

What’s the difference?• 15-30% average file size savings with automated tools

• Usually 50-80% savings with manual tools

• That could mean SECONDS off your load time

Page 25: Site Speed 101: How to Get Your Site to Load in 1 Second or Less

© 2015 Eighty & Eight dba dustina LLC. Creative Commons Attribution 4.0 License.

3.1 MB

Page 26: Site Speed 101: How to Get Your Site to Load in 1 Second or Less

© 2015 Eighty & Eight dba dustina LLC. Creative Commons Attribution 4.0 License.

182 KB

Page 27: Site Speed 101: How to Get Your Site to Load in 1 Second or Less

© 2015 Eighty & Eight dba dustina LLC. Creative Commons Attribution 4.0 License.

Results?• Original load time was 10-17 seconds on average

• After optimizations, 600 milliseconds on average

Page 28: Site Speed 101: How to Get Your Site to Load in 1 Second or Less

© 2015 Eighty & Eight dba dustina LLC. Creative Commons Attribution 4.0 License.

Page 29: Site Speed 101: How to Get Your Site to Load in 1 Second or Less

© 2015 Eighty & Eight dba dustina LLC. Creative Commons Attribution 4.0 License.

4. Optimize WordPress• Eliminate unnecessary plugins• If ecommerce or a large site generally, consider a separate

database, or a database server• Optimize your database• Remove unused files, pages, drafts, etc.• Use light themes and/or separate mobile theme• Understand what your JavaScript is doing

Page 30: Site Speed 101: How to Get Your Site to Load in 1 Second or Less
Page 31: Site Speed 101: How to Get Your Site to Load in 1 Second or Less

© 2015 Eighty & Eight dba dustina LLC. Creative Commons Attribution 4.0 License.

How well optimized is LingsCars.com?

Page 32: Site Speed 101: How to Get Your Site to Load in 1 Second or Less

© 2015 Eighty & Eight dba dustina LLC. Creative Commons Attribution 4.0 License.

5. Combine AND Minify all the code

• Javascript• CSS• HTML

Page 33: Site Speed 101: How to Get Your Site to Load in 1 Second or Less

© 2015 Eighty & Eight dba dustina LLC. Creative Commons Attribution 4.0 License.

6. Remove query strings from *static* resources

Page 34: Site Speed 101: How to Get Your Site to Load in 1 Second or Less

© 2015 Eighty & Eight dba dustina LLC. Creative Commons Attribution 4.0 License.

7. Cache & CDN• Server cache• Object cache• Memcache

• Leverage user’s browser cache

Page 35: Site Speed 101: How to Get Your Site to Load in 1 Second or Less

I DO NOT SUPPOSE YOU COULD SPEED THINGS UP?!

© 2015 Eighty & Eight dba dustina LLC. Creative Commons Attribution 4.0 License.

Page 36: Site Speed 101: How to Get Your Site to Load in 1 Second or Less

© 2015 Eighty & Eight dba dustina LLC. Creative Commons Attribution 4.0 License.

8. Minimize slow or heavy scripts & plugins• Avoid Flash and Silverlight at all costs

• Minimize reliance on Javascript

Page 37: Site Speed 101: How to Get Your Site to Load in 1 Second or Less

I THOUGHT YOU SAID THIS SHIP WAS FAST?!

Page 38: Site Speed 101: How to Get Your Site to Load in 1 Second or Less

© 2015 Eighty & Eight dba dustina LLC. Creative Commons Attribution 4.0 License.

9. Minimize use of external content• Embedded external content• Videos• Social feeds• Ads

• Google Fonts (not all created equal)• Install fonts locally if possible

• NEVER use image files loading from another site (hotlinking), and block others from doing the same from your site

Page 39: Site Speed 101: How to Get Your Site to Load in 1 Second or Less

Don’t turn your site visitors into this guy

© 2015 Eighty & Eight dba dustina LLC. Creative Commons Attribution 4.0 License.

Page 40: Site Speed 101: How to Get Your Site to Load in 1 Second or Less

© 2015 Eighty & Eight dba dustina LLC. Creative Commons Attribution 4.0 License.

10. Optimize how the page renders (DOM)• CSS in the header

• Javascript in the footer

• If your site has a lot of images, use Lazy Load (JS)

• Make sure Javascript loads asynchronously

Page 41: Site Speed 101: How to Get Your Site to Load in 1 Second or Less

© 2015 Eighty & Eight dba dustina LLC. Creative Commons Attribution 4.0 License.

Page 42: Site Speed 101: How to Get Your Site to Load in 1 Second or Less

© 2015 Eighty & Eight dba dustina LLC. Creative Commons Attribution 4.0 License.

Page 43: Site Speed 101: How to Get Your Site to Load in 1 Second or Less

© 2015 Eighty & Eight dba dustina LLC. Creative Commons Attribution 4.0 License.

Page 44: Site Speed 101: How to Get Your Site to Load in 1 Second or Less

© 2015 Eighty & Eight dba dustina LLC. Creative Commons Attribution 4.0 License.

Questions?

Page 45: Site Speed 101: How to Get Your Site to Load in 1 Second or Less

© 2015 Eighty & Eight dba dustina LLC. Creative Commons Attribution 4.0 License.

Feel Free to Ask Questions Later TooSlides: dnay.co/DeckDMC15

Tons of Resources: dnay.co/DMC15

[email protected]

@dustinnay