HTTP/2 & JS/CSS optimization: eBay’s approach

Quick follow-up to my previous post about HTTP/2 and Autoptimize; I just read an “Packaging for Performance”, an interesting article on Performance Calendar by eBay’s Senthil Padmanabhan. Well worth the read, but the summary; their research confirms bundling of JS/CSS still has clear performance benefits, but they did stop bluntly aggregating all in one file to improve cache-ability. This leaves them with;

  • one optimized JS and one optimized CSS file for the core libraries, used throughout eBay, high cache-ratio & payload
  • one optimized JS and one optimized CSS file for the “domain constants”, used on specific eBay segments, medium cache-ratio & payload
  • one optimized JS and one optimized CSS file for the “domain variables” containing fast changing code for specific segments, having lowest cache-ratio and payload

So yeah, I see a bright future for Autoptimization in the coming age of HTTP/2! :–)

3 thoughts on “HTTP/2 & JS/CSS optimization: eBay’s approach

  1. Dan

    The question is how can you effectively generate with Autoptimize the “one optimized JS and one optimized CSS file for the core libraries, used throughout eBay, high cache-ratio & payload”.
    The current black list feature is good, but not effective enough.
    What about a feature which decides automatically which JS and CSS to aggregate? (by crawling through the url and only combining resources which appear on most pages)

    Reply
    1. frank Post author

      You can use the AO API’s whitelist filters to tell AO what to aggregate Dan. This will eventually somehow end up in the UI as well. Deciding what to aggregate automagically will probably not happen any time soon though.

      Reply
  2. Dan

    Hehe I understand Frank, there would be some magic required.

    But integrating the whitelist as setting would be very useful.
    Even better would be to separate the concatenation and minification Black/Whitelists. It seems with http2 minification is mostly wished, but concatenation better selectively only for the files used on most pages.

    I any way, thanks for maintaining and extending this great plugin!

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.