3

Magento standard can merge js and css. There is no standard functionality to minify this file afterwards.

How can we do this?

2 Answers 2

3

If you are in Magento 1.x, i would ignore the merging for css and js files. That functionality breaks more things that it fixes. There is no built in minification for Magento 1.x, so you will have to find a site that does that process (there are about 1.5 million of them on the web) and copy the css into the minifier and save the file with the new minified code. There is a few more things that go into making this work right, which i can clarify if this is the case.

If you are using Magento 1.9, it comes packaged with the RWD theme which uses SASS baked in. In that case, you can just use compass to compile the SCSS files to a minifided version. This setting is set in the config.rb file, which is also where you set the inline comments and other compilation settings.

If you are using a 3rd party theme, all bets are off on what they used.

If you clearify the setup you have, might be able to fish out a better solution for your use case.

2
  • In a way I agree that it does break things, but I've found after much deliberation and elbow grease, you can get it to merge properly. It definitely isn't perfect though. But merging it down can save a buttload of page load time. The main reasons for it breaking are either some missing parenthesis in some plugin JS or noConflict and jQuery being loaded improperly. Commented Jan 6, 2017 at 10:35
  • could you add the way you are setting up the merge as an answer? Since my solution didn't get a reply from the questioner, it would be great to have some more idea's on this post. Commented Jan 9, 2017 at 18:47
-3
**If you are using magento 1.9 simple css not scss.
you need to first try merge css and js form the mangeto backend defult feature.

If anyware break layout or desiging you need to check one by one which file was affect when useing merge css and js.

I hop it will help you.**
2
  • 1
    I read your answer twice and still have no idea what you are trying to say and how it answers the question. No word about minifying at all. Commented Aug 31, 2016 at 11:30
  • how are you answering the question?? Commented Mar 14, 2017 at 14:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.