• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Frontend Caching, PHPTek 2011, Chicago
 

Frontend Caching, PHPTek 2011, Chicago

on

  • 1,845 views

You’ve used all the server-side caching tricks in the book: memcache, APC, database cache and so on to squeeze every millisecond out, and now your site is as fast as it will ever get. Well guess ...

You’ve used all the server-side caching tricks in the book: memcache, APC, database cache and so on to squeeze every millisecond out, and now your site is as fast as it will ever get. Well guess again!

These technologies are caching and creating the HTML which, if they done correctly, is only 10 – 20% of the user response time, so there is a lot of room for improvement. Learn how to optimize your JavaScript, CSS, Images, Cookies and a whole slew of other things that make frontend caching a magical place.

Statistics

Views

Total Views
1,845
Views on SlideShare
1,845
Embed Views
0

Actions

Likes
0
Downloads
31
Comments
0

0 Embeds 0

No embeds

Accessibility

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Frontend Caching, PHPTek 2011, Chicago Frontend Caching, PHPTek 2011, Chicago Presentation Transcript

    • Frontend Caching Helgi Þormar Þorbjörnsson PHP Tek, Chicago, 26th May 2011Thursday, 26 May 2011
    • Who am I?Thursday, 26 May 2011
    • Who am I? VP of Engineering at Orchestra.ioThursday, 26 May 2011
    • Who am I? VP of Engineering at Orchestra.io Developer at PEARThursday, 26 May 2011
    • Who am I? VP of Engineering at Orchestra.io Developer at PEAR From IcelandThursday, 26 May 2011
    • Who am I? VP of Engineering at Orchestra.io Developer at PEAR From Iceland @h on TwitterThursday, 26 May 2011
    • Pareto Principle 20% 80%Thursday, 26 May 2011
    • 80 / 20 Rule 20% 80% 20% of the population receives 80% of the incomeThursday, 26 May 2011
    • 80 / 20 Rule 20% 80% 20% of causes produce 80% of the effectsThursday, 26 May 2011
    • 80% of response time is spent downloading resourcesThursday, 26 May 2011
    • 4 Rules of Web PerformanceThursday, 26 May 2011
    • Weight Time Processing PerceptionThursday, 26 May 2011
    • PerceptionThursday, 26 May 2011
    • Make people think your site is fastThursday, 26 May 2011
    • When people can interact with the siteThursday, 26 May 2011
    • Thursday, 26 May 2011
    • “It all depends on how we look at things, and not how they are in themselves.” - Carl G. JungThursday, 26 May 2011
    • Perception 50% of users arrive on an empty cacheThursday, 26 May 2011
    • Perception Empty Cache Full Cache 28.0K 1 HTML Document 1.9K 1 Style Sheet File 59.5K 4 Javascript Files 28.0K 1 HTML Document 78.7K 24 Images 0.1K 2 Images 168.1K Total Size 28.1K Total Size 30 HTTP Requests 3 HTTP Requests 2.4s Response Time 0.9s Response TimeThursday, 26 May 2011
    • WeightThursday, 26 May 2011
    • HTTP RequestsThursday, 26 May 2011
    • HTTP Requests Less is moreThursday, 26 May 2011
    • HTTP Requests Less is more Fewer HTTP RequestsThursday, 26 May 2011
    • HTTP Requests Less is more Fewer HTTP Requests Easy to improve onThursday, 26 May 2011
    • CookiesThursday, 26 May 2011
    • Cookies Sent with static contentThursday, 26 May 2011
    • Cookies Sent with static content Slow upstream speedThursday, 26 May 2011
    • Cookies Sent with static content Slow upstream speed Big cookiesThursday, 26 May 2011
    • Experiment Time! Cookie Size Response Time (Delta) 0 bytes 78 ms ( 0 ms) 500 bytes 79 ms ( +1 ms) 1000 bytes 94 ms (+16 ms) 1500 bytes 109 ms (+31 ms) 2000 bytes 125 ms (+47 ms) 2500 bytes 141 ms (+63 ms) 3000 bytes 156 ms (+78 ms)Thursday, 26 May 2011
    • Experiment Time! Cookie Size Response Time (Delta) 0 bytes 78 ms ( 0 ms) 500 bytes 79 ms ( +1 ms) 1000 bytes 94 ms (+16 ms) 1500 bytes 109 ms (+31 ms) 2000 bytes 125 ms (+47 ms) 2500 bytes 141 ms (+63 ms) 3000 bytes 156 ms (+78 ms)Thursday, 26 May 2011
    • Experiment Time! Cookie Size Response Time (Delta) 0 bytes 78 ms ( 0 ms) 500 bytes 79 ms ( +1 ms) 1000 bytes 94 ms (+16 ms) 1500 bytes 109 ms (+31 ms) 2000 bytes 125 ms (+47 ms) 2500 bytes 141 ms (+63 ms) 3000 bytes 156 ms (+78 ms)Thursday, 26 May 2011
    • CookiesThursday, 26 May 2011
    • CookiesThursday, 26 May 2011
    • Cookies Remove unnecessary cookiesThursday, 26 May 2011
    • Cookies Remove unnecessary cookies Appropriate domain levelThursday, 26 May 2011
    • Cookies Remove unnecessary cookies Appropriate domain level Keep size lowThursday, 26 May 2011
    • Cookies Remove unnecessary cookies Appropriate domain level Keep size low Set ExpiresThursday, 26 May 2011
    • Parallel DownloadsThursday, 26 May 2011
    • Parallel Downloads Be aware of max connection limitsThursday, 26 May 2011
    • Parallel Downloads Borrowed from BrowserScope.orgThursday, 26 May 2011
    • Parallel Downloads Borrowed from BrowserScope.orgThursday, 26 May 2011
    • Parallel Downloads One domain = 2 Parallel connectionsThursday, 26 May 2011
    • Parallel Downloads One domain = 2 Parallel connections HTML Image Image Image Image Image Image Image Image 0.4 0.8 1.2 1.6 2 2.4 SecsThursday, 26 May 2011
    • Parallel Downloads Two domains = 4 Parallel connections HTML Image Image Image Image Image Image Image Image 0.4 0.8 1.2 1.6 2 2.4 SecsThursday, 26 May 2011
    • Parallel Downloads Too many hostnames can cause complicationsThursday, 26 May 2011
    • Parallel Downloads Too many hostnames can cause complications 2 – 4 sub domains is a good averageThursday, 26 May 2011
    • Combine Files Combining 6 scripts into 1 eliminates 5 requestsThursday, 26 May 2011
    • Combine Files Combining 6 scripts into 1 eliminates 5 requests Challenges: develop as separate modules combinations vs. loading more than neededThursday, 26 May 2011
    • Javascript Doesn’t comply with parallel download rulesThursday, 26 May 2011
    • Javascript Doesn’t comply with parallel download rules HTML JS Image Image Image Image Image Image Image 0.4 0.8 1.2 1.6 2 2.4 SecsThursday, 26 May 2011
    • Javascript script defer attribute is not a solutionThursday, 26 May 2011
    • Javascript script defer attribute is not a solution Solution - move them as low in the page as possibleThursday, 26 May 2011
    • ProcessingThursday, 26 May 2011
    • ProcessingThursday, 26 May 2011
    • Processing Fake the deliveryThursday, 26 May 2011
    • Processing Fake the delivery Lazy LoadingThursday, 26 May 2011
    • Processing Fake the delivery Lazy Loading Above the fold LoadingThursday, 26 May 2011
    • Processing Fake the delivery Lazy Loading Above the fold Loading Delay Javascript LoadingThursday, 26 May 2011
    • ProcessingThursday, 26 May 2011
    • Processing Bonus - async attributeThursday, 26 May 2011
    • Processing Bonus - async attribute http://www.appelsiini.net/projects/lazyloadThursday, 26 May 2011
    • JS MinificationThursday, 26 May 2011
    • JS Minification Crushes the file Strips out all cruft Voodoo Magic!Thursday, 26 May 2011
    • JS Minfication UglifyJS Google Closure YUI CompressorThursday, 26 May 2011
    • JS Minfication UglifyJS Google Closure YUI Compressor http://bit.ly/compression-ratesThursday, 26 May 2011
    • CSS Minification YUI Compressor minifycss.com OOCSSThursday, 26 May 2011
    • GZip GZip can be used onThursday, 26 May 2011
    • GZip GZip can be used on JSThursday, 26 May 2011
    • GZip GZip can be used on JS CSSThursday, 26 May 2011
    • GZip GZip can be used on JS CSS XMLThursday, 26 May 2011
    • GZip GZip can be used on JS CSS XML JSONThursday, 26 May 2011
    • GZip GZip should not be used onThursday, 26 May 2011
    • GZip GZip should not be used on ImagesThursday, 26 May 2011
    • GZip GZip should not be used on Images Document formatsThursday, 26 May 2011
    • GZip GZip should not be used on Images Document formats Already compressedThursday, 26 May 2011
    • 404 robots.txt faviconThursday, 26 May 2011
    • ImagesThursday, 26 May 2011
    • Images faviconThursday, 26 May 2011
    • Images favicon CSS SpritesThursday, 26 May 2011
    • Images favicon CSS Sprites inline base64Thursday, 26 May 2011
    • Images favicon CSS Sprites inline base64Thursday, 26 May 2011
    • ImagesThursday, 26 May 2011
    • Images Badly optimisedThursday, 26 May 2011
    • Images Badly optimised ThumbnailsThursday, 26 May 2011
    • Images Badly optimised Thumbnails PNGs compressed up to 50%Thursday, 26 May 2011
    • PNG Optimise OptiPNG pngwolf pngcrush jpegtranThursday, 26 May 2011
    • TimeThursday, 26 May 2011
    • SSLThursday, 26 May 2011
    • SSL Extra roundtripsThursday, 26 May 2011
    • SSL Extra roundtrips More resources for serversThursday, 26 May 2011
    • SSL Extra roundtrips More resources for servers Worth it, tho!Thursday, 26 May 2011
    • Tread the users’ pathThursday, 26 May 2011
    • Tread the users’ path Test on slower connectionsThursday, 26 May 2011
    • Tread the users’ path Test on slower connections Slow proxiesThursday, 26 May 2011
    • Tread the users’ pathThursday, 26 May 2011
    • Tread the users’ path Tables / PhonesThursday, 26 May 2011
    • Tread the users’ path Tables / Phones Airline connectionsThursday, 26 May 2011
    • Tread the users’ path Tables / Phones Airline connections Public placesThursday, 26 May 2011
    • CDNThursday, 26 May 2011
    • CDN Single domainThursday, 26 May 2011
    • CDN Single domain Smart routingThursday, 26 May 2011
    • CDN Single domain Smart routing Data is closer to end userThursday, 26 May 2011
    • CDNThursday, 26 May 2011
    • CDNThursday, 26 May 2011
    • CDN on a BudgetThursday, 26 May 2011
    • CDN on a Budget S3Thursday, 26 May 2011
    • Query vs. Filename revisionsThursday, 26 May 2011
    • Query vs. Filename revisions Cache far in futureThursday, 26 May 2011
    • Query vs. Filename revisions Cache far in future Revisioning forces downloadsThursday, 26 May 2011
    • Query vs. Filename revisions Cache far in future Revisioning forces downloadsThursday, 26 May 2011
    • Query revisionsThursday, 26 May 2011
    • Query revisions Easy and convenientThursday, 26 May 2011
    • Query revisions Easy and convenient Usually not recommendedThursday, 26 May 2011
    • Query revisions Easy and convenient Usually not recommended Bad proxies are a problemThursday, 26 May 2011
    • Filename revisionsThursday, 26 May 2011
    • Filename revisions Requires more workThursday, 26 May 2011
    • Filename revisions Requires more work RecommendedThursday, 26 May 2011
    • Filename revisions Requires more work Recommended During build, using md5 hashThursday, 26 May 2011
    • CompromiseThursday, 26 May 2011
    • Compromise Create a version functionThursday, 26 May 2011
    • Compromise Create a version function Put on all resourcesThursday, 26 May 2011
    • Compromise Create a version function Put on all resources mod_rewrite magicThursday, 26 May 2011
    • Compromise Create a version function Put on all resources mod_rewrite magic http://bit.ly/query_rev_compThursday, 26 May 2011
    • Browser ToolsThursday, 26 May 2011
    • Browser Tools FirebugThursday, 26 May 2011
    • Browser Tools Firebug YSlowThursday, 26 May 2011
    • Browser Tools Firebug YSlow PageSpeedThursday, 26 May 2011
    • Browser Tools Firebug YSlow PageSpeed Chrome InspectorThursday, 26 May 2011
    • Other ToolsThursday, 26 May 2011
    • Other Tools HTTPWatch.comThursday, 26 May 2011
    • Other Tools HTTPWatch.com WebPageTest.orgThursday, 26 May 2011
    • Other Tools HTTPWatch.com WebPageTest.org HTTPArchive.orgThursday, 26 May 2011
    • Other Tools HTTPWatch.com WebPageTest.org HTTPArchive.org chartbeat.comThursday, 26 May 2011
    • Other ToolsThursday, 26 May 2011
    • Other Tools WonderProxy.comThursday, 26 May 2011
    • Other Tools WonderProxy.com BrowserScope.comThursday, 26 May 2011
    • Other Tools WonderProxy.com BrowserScope.com html5boilerplate.comThursday, 26 May 2011
    • “Knowledge rests not upon truth alone, but upon error also” - Carl G. JungThursday, 26 May 2011
    • Questions? @h helgi@orchestra.io Joind.in: http://joind.in/3401Thursday, 26 May 2011