GETTING FULL SCORE ON GOOGLE
PA G E S P E E D , P I N G D O M A N D G T M E T R I X

OPTIMISING FOR
PERFORMANCE
THOMAS BENSMANN
LEAD DEVELOPER AND SOLUTIONS ARCHITECT
M E T R O N E T A S - M E T R O N E T. N O
WHY SPEED
M AT T E R S ?

• More returning visitors
• More page views













First impressions matter
WHY SPEED
M AT T E R S ?

• More returning visitors
• More page views
• Google cares (SEO)
• When you know

something

could be better…
“Fast is better than slow.”
SERVER TECH

TERMINOLOGY
TERMINOLOGY

• Nginx - known for speed


and resource usage

• Varnish - used for caching

and/or load balancing

• Apache - very common
• Google PageSpeed mod -

Google’s module for Apache
and Nginx
“I’ve hugged a lot of servers in my life, and believe
me, they do not hug you back. They hate you.”

– AMAZON CTO, WERNER VOGELS
SAVING BANDWIDTH

COMPRESSION
COMPRESSION

• Save bandwidth
• No difference in content
• Gzip
• mod-deflate (apache)
WHO DOESN’T LIKE WAITING IN LINE?

RENDER BLOCKING
RENDER
BLOCKING
• Scripts
• Styles
• The page has to wait


• Load CSS before JS
• Load JS in the footer
• Load JS async
KEEP IT SHORT

M I N I F Y…
MINIFY

• CSS, JS and HTML
• Reduced file sizes
• YUI Compressor
• Google PageSpeed mod


for Apache and Nginx
OPTIMISE IMAGES
• ImageOptim (on your mac)
• Atomised with Grunt or Gulp
• Server-side optimisers (jpegtran, optipng/pngout)
• WordPress plugin (EWWW image optimizer)
• Google PageSpeed mod
Lazy loading
GETTING RESOURCES WHEN NEEDED IF NEEDED
PLUGIN: BJ LAZY LOAD
W H Y M A K E I T D I F F I C U LT F O R O U R S E L F ?

REDUCE REQUESTS
REDUCE
REQUESTS

• Why keep asking the

server?
• Combine files
• Inline small files
• Reduce request

P L U G I N : M I N I T B Y K A S PA R S D
Keep your content in stock
CACHING
PLUGINS

• W3 Total Cache
• Batcache
• WP Super Cache
• Quick Cache
CACHING
ENGINES

• APC (PHP < 5.5)
• Memcache
• Redis
CACHING
SOLUTIONS

• Varnish
• Nginx
• Cloudflare (external)
CLIENT SIDE CACHING
• Setting HTTP headers
• expires
• cache-control/pragma
• Version numbers in name
x script.js
x script.js?v=1.2
✓ script-1.2.js
M O D _ PA G E S P E E D
• Caches
• Combines and/or inlines files
• Minifies JS, CSS and HTML
• Optimizes images (metadata, compression,

dimensions)

• Lazy loading images
A F R I E N D LY

WARNING
T E S T I N G A N D E V A L U AT I O N
• Google Pagespeed Insights
• Pingdom Website Speed Test
• GTMetrix
!

• Most importantly, the people who visit the site
CHECKING OUT

R E S U LT S
CHECKING OUT

R E S U LT S
CHECKING OUT

R E S U LT S
GOALS

• Full score should not be a goal
• Use it as guidelines
• Don’t follow it blindly
• Know why
THAT’S ALL I HAD

THANK YOU FOR YOUR
TIME – ANY QUESTIONS?

Optimising for Performance