cancel
Showing results for 
Search instead for 
Did you mean: 

Minify CSS

SOLVED

Minify CSS

Hi, is there anything to be careful or cautious of when minifyiny css code to try speed up my website?

I’m using GTMetrix.com to do this? My thoughts are to copy the code and save it in my personal files before I change it as per the GTMetrix recommendation as a back up.

Can this cause problems when hopefully upgrading v1.9 to the latest Magento version?
1 ACCEPTED SOLUTION

Accepted Solutions

Re: Minify CSS

Hi @Jonathan0292,

 

Yes, that recomendation is ok.

Also, if you use the Magento's merge feature and then some minify plugin, you'll get also en improvment on JS weight but also the number of request will be lower.

 

Another suggestion could be to explore HTTP/2.

View solution in original post

8 REPLIES 8

Re: Minify CSS

Hi @Jonathan0292,

 

Magento allows you OOTB to merge files but not to minify.

There are several modules (free and paid) that works pretty well.

Sometimes the minified and merged files can be a little problem on backend so you can minify and merge only the files for your store front and then use the regular calls to backend.

 

Re: Minify CSS

Thank you for your reply.

Is there any you recommend?

What’s OOTB?

Re: Minify CSS

Hi @Jonathan0292,


Sorry, OOTB = Out Of The Box.

Mmm... I know there was one that works always fine (but now I can't remeber the name).

At the Marketplace there are only this alternatives: https://marketplace.magento.com/catalogsearch/result/?q=minify#q=minify&idx=m2_cloud_prod_default_pr...

 

But if you look thourgh GitHub there are a lot of options.

The module that I'm trying to remember, maybe was this one: https://github.com/ho-nl-fork/magento1-WBL_Minify (I'm not sure, you should check by yourself).

 

Also, a few years ago I published a module that I've been using for me: https://github.com/barbanet/magento-dc-minifier (but I saw some weird error on one project so I can't say is bulletproof... it will depend a little bit on the javascript files you have)

 

But again, on GitHub you'll find a lot of options. If these options fails you should take a little bit of time to try another modules or maybe you can explore paid versions.

Re: Minify CSS

Is using GTMetrix recommended Optimized Css a bad idea?

Re: Minify CSS

Hi @Jonathan0292,

 

Can you share the report? I remember the style of reports from GTMetrix but not the CSS code recomendation.

Re: Minify CSS

Re: Minify CSS

Hi @Jonathan0292,

 

Yes, that recomendation is ok.

Also, if you use the Magento's merge feature and then some minify plugin, you'll get also en improvment on JS weight but also the number of request will be lower.

 

Another suggestion could be to explore HTTP/2.

Re: Minify CSS

Excellent thank you.