Archive for May, 2014

Efficient Asset Management with Multiple Merged Asset Groups

May 19th, 2014

This post covers a very simple idea that I have been using internally for a while. It is a solution to the issue that nearly all Magento sites face regarding optimization of loading fewer Javascript and CSS resources (accomplished via merging) vs not loading the same resources multiple times (a side-effect of optimizing for the former). The idea is simple: instead of having only one merged JS/CSS file per page, have two or more. I’m sure the idea is not entirely new, so I’ll include some easy instructions for implementation (which is new, to my knowledge). For simplicity I will call the method “Multiple Merged Asset Groups” (MMAG).

Without going in-depth into the Magento core code mechanics, the ‘page/html_head’ block is the one that includes the logic for merging JS/CSS files. Read more…