3. #WCBTN
#1 Images
Use Progressive JPG’s for pictures
Use PNG’s for transparencies
Use SVG’s for graphics that need to scale
Don’t use WebP… YET (80% browser support)
Be careful with GIF’s (use looped videos instead)
5. #WCBTN
#2 Hosting
Install SSL and HTTP2
Make sure it has SSD Hard Drives
Isolated accounts
PHP version 7.0 or later
Make sure it has QUIC
6. #WCBTN
#3 Cache
Try NOT to use Cache Plugins
Delegate that responsibility to the Browser and Server
Browser Cache Server Cache
&
7. #WCBTN
#3 Cache
Browser Cache
—Hey browser, you know what?
Don’t delete these files 'cause they
won’t change for a long time, so feel
free to reuse them until I tell you.
Got it?
— I Got it.
8. <IfModule mod_expires.c>
ExpiresActive on
ExpiresDefault "access plus 2 months"
# CSS
ExpiresByType text/css "access plus 1 year"
# Data interchange
ExpiresByType application/json "access plus 0 seconds"
ExpiresByType application/xml "access plus 0 seconds"
ExpiresByType text/xml "access plus 0 seconds"
# Favicon (cannot be renamed!)
ExpiresByType image/x-icon "access plus 1 week"
# HTML components (HTCs)
ExpiresByType text/x-component "access plus 2 months"
# HTML
ExpiresByType text/html "access plus 0 seconds"
# JavaScript
ExpiresByType application/javascript "access plus 1 year"
# Manifest files
ExpiresByType application/x-web-app-manifest+json "access plus 0 seconds"
ExpiresByType text/cache-manifest "access plus 0 seconds"
# Media
ExpiresByType audio/ogg "access plus 2 months"
ExpiresByType image/gif "access plus 2 months"
ExpiresByType image/jpeg "access plus 2 months"
ExpiresByType image/png "access plus 2 months"
ExpiresByType video/mp4 "access plus 2 months"
ExpiresByType video/ogg "access plus 2 months"
ExpiresByType video/webm "access plus 2 months"
# Web feeds
ExpiresByType application/atom+xml "access plus 1 hour"
ExpiresByType application/rss+xml "access plus 1 hour"
# Web fonts
ExpiresByType application/font-woff "access plus 2 months"
ExpiresByType application/font-woff2 "access plus 2 months"
ExpiresByType application/vnd.ms-fontobject "access plus 2 months"
ExpiresByType application/x-font-ttf "access plus 2 months"
ExpiresByType font/opentype "access plus 2 months"
ExpiresByType image/svg+xml "access plus 2 months"
</IfModule>