Webmasters Stack Exchange is a question and answer site for pro webmasters. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I thought Magento came with this feature out of the box but it doesn't appear to be working at all. I'm not sure if I haven't set it up properly, but right now I'm resorting to using cat and altering the page.xml layout file to use the combined javascript and css files.

Can I make Magento do this instead or is there an extension that adds this feature?

(duplicate of http://stackoverflow.com/questions/4236381/is-there-a-magento-extension-for-combining-compressing-javascript-and-css)

share|improve this question
up vote 1 down vote accepted

So far the Magento module method of doing this is using Fooman Speedster. It merges and minifies your Javascript and CSS fils, typically merging everything into two JS files and two CSS files. I've had issues using Magento's built-in JS/CSS merge so I abandoned it for the module. The developer keeps it up to date and it works with versions 1.2 though 1.6. Free.


It requires mod_rewrite to be enabled and .htaccess support. Installation of Yoast's Canonical Urls extension or the Mxperts jQuery Base extension will break the extension.

share|improve this answer

The quickest thing I can think of is Google's mod_pagespeed for Apache. I've used it on my Magento store and didn't have any issues with the combination of the JS and CSS, though did run into some issues with the caching and what have you, but you can turn those off pretty easily.

With mod_pagespeed, you want to use these filters in you pagespeed.conf:

# Combine CSS
ModPagespeedEnableFilters combine_css
# Minify Javascript
ModPagespeedEnableFilters rewrite_javascript

Also, check out the .htaccess file in Paul Irish's HTML5 Boilerplate. He outlines how to combine certain JS files. You don't want to combine all Javascript into one file, becaue there might be times when you want JS to run in a certain order.

share|improve this answer

May the extention help you https://www.magentocommerce.com/magento-connect/fooman-speedster.html

share|improve this answer
downvoted, there's no point posting as a new answer, just edit the other post to include the correct URL... – omouse Oct 14 '11 at 16:31

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.