gone in 4 seconds web performance optimization

35
Gone In 4 Seconds Web Performance Optimization Yohan Totting @tyohan #TechnicalThursday Bandung Digital Valley

Upload: yohan-totting

Post on 29-Nov-2014

1.538 views

Category:

Technology


3 download

DESCRIPTION

How to prevent your web users leave you in 4 seconds because your website is not loaded. This slide is provide overview how to optimize your website from backend to frontend.

TRANSCRIPT

Page 1: Gone in 4 seconds   web performance optimization

Gone In 4 SecondsWeb Performance Optimization

Yohan Totting @tyohan

#TechnicalThursday Bandung Digital Valley

Page 2: Gone in 4 seconds   web performance optimization

Why?

Page 3: Gone in 4 seconds   web performance optimization
Page 4: Gone in 4 seconds   web performance optimization

80-90%10-20%

Response Time

Load HTML Render HTML

Server +

NetworkBrowser

Page 5: Gone in 4 seconds   web performance optimization

Backend Optimization

Page 6: Gone in 4 seconds   web performance optimization

Database Tuneup

Page 7: Gone in 4 seconds   web performance optimization

Choose Right Database and Engine

Page 8: Gone in 4 seconds   web performance optimization

Data Structure &

Field Index

Page 9: Gone in 4 seconds   web performance optimization

Query All At Once vs

Split to Multiple Query

Page 10: Gone in 4 seconds   web performance optimization

Optimize Your Configuration

Page 11: Gone in 4 seconds   web performance optimization

Application Tune Up

Page 12: Gone in 4 seconds   web performance optimization

App performance it’s not about the language It’s about your code

Page 13: Gone in 4 seconds   web performance optimization

Lazy Loading

Page 14: Gone in 4 seconds   web performance optimization

Cache is your nitro

Page 15: Gone in 4 seconds   web performance optimization

Be careful with looping

Page 16: Gone in 4 seconds   web performance optimization

Use Framework

Page 17: Gone in 4 seconds   web performance optimization

Web Server Tune Up

Page 18: Gone in 4 seconds   web performance optimization

Use Nginx

Page 19: Gone in 4 seconds   web performance optimization

Enable Compression

Page 20: Gone in 4 seconds   web performance optimization

Don’t forget necessary header

Page 21: Gone in 4 seconds   web performance optimization

ETags

HTTP/1.1 200 OK

Last-Modified: Tue, 12 Dec 2006 03:03:59 GMT

ETag: "10c24bc-4ab-457e1c1f"

Content-Length: 12195

Page 22: Gone in 4 seconds   web performance optimization

Expires

Expires: Wed, 17 Jun 2015 20:00:00 GMT

Page 23: Gone in 4 seconds   web performance optimization

Use Caching Proxy

Page 24: Gone in 4 seconds   web performance optimization

Front End Tune Up

Page 25: Gone in 4 seconds   web performance optimization

Minimize Loading Time

Page 26: Gone in 4 seconds   web performance optimization

Reduce DependenciesFewer files to download means fewer HTTP requests and

faster loading times.

Page 27: Gone in 4 seconds   web performance optimization

Reduce Dependencies

• Combine & minify CSS & javascript

• Parallelize downloads across hostnames

• Combine images using CSS sprites

• Minimize DNS lookup

• Avoid redirect

Page 28: Gone in 4 seconds   web performance optimization

Minimize Request Size

• Keeping cookies and request headers as small as possible.

• Serve static content from a cookieless domain

Page 29: Gone in 4 seconds   web performance optimization

Reduce Image DimensionsOn top of the extra download time, precious processing

power and memory are used to resize high-resolution images.

Page 30: Gone in 4 seconds   web performance optimization

Reduce Client-Side ProcessingRethinking the use of JavaScript and keeping it to a

minimum are best.

Page 31: Gone in 4 seconds   web performance optimization

RWD vs RESS

Page 32: Gone in 4 seconds   web performance optimization

Use Font Awesome Icon

Page 33: Gone in 4 seconds   web performance optimization

Mobile First

Page 34: Gone in 4 seconds   web performance optimization

Test It

Page 35: Gone in 4 seconds   web performance optimization

ThanksYohan

@tyohan