Optimize

Post on 16-May-2015

215 views 0 download

Transcript of Optimize

Optimizing Load Times& Performance

Client / Server / Backend

Alex Gvozden www.CaseTrek.com / Eleven accelerator

alex@casetrek.com @mrsteel

Why Optimize it?

Increase UXRank better on GoogleUse resources better

How?

Server configurationReduce requests and file sizes

Code optimizationCaching

Server

Choose a good hostingGood customer service

Google for “Problem with … hosting”

Server configuration

Add Cache-Control and Expires headersmod_cache & mod_expires

http://www.askapache.com/htaccess/apache-speed-cache- control.html

Or use HTTP headers, etc. <meta http-equiv="Cache-control" content="public">

http://www.peej.co.uk/articles/http-caching.html

Server configuration

Host assets separately (JS, CSS, Images) http://yuiblog.com/blog/2007/04/11/performance-research-part-4/

Server configuration

Host assets separately (JS, CSS, Images) http://yuiblog.com/blog/2007/04/11/performance-research-part-4/

Reduce requests & File size

Combine and minify CSS & Javascripthttps://code.google.com/p/minify/

Reduce requests & File sizes

Optimize image sizesImageOptim for Mac

Online http://www.smushit.com/ysmush.it/

Reduce requests & File sizes

Sprite sheets…

Caching

Use APC – non distributedor Memcached - distributed

http://memcached.org/

Cache vars, templates, SQL queries

And PHP faster-> FastCGI

Even more speed and less memory consumedhttp://www.brandonturner.net/blog/2009/07/fastcgi_php_opcode_cache_benchmarks/