<![CDATA[ Automatic optimize/minify CSS and JS files - My Forums]]> https://forums.modx.com/thread/?thread=25044 <![CDATA[Re: Automatic optimize/minify CSS and JS files]]> https://forums.modx.com/thread/25044/automatic-optimize-minify-css-and-js-files?page=4#dis-post-535713
So, maybe not relevant after all, for you experienced users. Never mind :p]]>
nuan88 Dec 10, 2015, 09:49 PM https://forums.modx.com/thread/25044/automatic-optimize-minify-css-and-js-files?page=4#dis-post-535713
<![CDATA[Re: Automatic optimize/minify CSS and JS files]]> https://forums.modx.com/thread/25044/automatic-optimize-minify-css-and-js-files?page=4#dis-post-535663 Using it on all new (EVO) websites. All I need to do is add /min/?f= and combine + seperate the paths with a ,

Its not that hard to do. I rather deside what files I compress and which I don't then having it done automaticly.



]]>
fourroses666 Dec 10, 2015, 02:25 AM https://forums.modx.com/thread/25044/automatic-optimize-minify-css-and-js-files?page=4#dis-post-535663
<![CDATA[Re: Automatic optimize/minify CSS and JS files]]> https://forums.modx.com/thread/25044/automatic-optimize-minify-css-and-js-files?page=4#dis-post-535658 http://forums.modx.com/thread/91496/why-compress-css-and-compress-js-are-silly?page=3#dis-post-530871]]> nuan88 Dec 09, 2015, 10:55 PM https://forums.modx.com/thread/25044/automatic-optimize-minify-css-and-js-files?page=4#dis-post-535658 <![CDATA[Re: Automatic optimize/minify CSS and JS files]]> https://forums.modx.com/thread/25044/automatic-optimize-minify-css-and-js-files?page=4#dis-post-535657 http://code.google.com/p/minify/ on all my web projects. I do this to speed up the website so that the site is as fast as possible.
The 'problem' is that I need to build in minify myself, where the best solution is that a plugin handles this for me.

I'm not sure if something like minify can be turned into a plugin that scans the output of the pages for CSS and JS calls and then combine them into a call that activates minify. Can someone tell me if this possible and maybe put me in the good direction so that I can try to make a plugin like this?

By the way; it doesn't have to be "minify", I just want a option to optimize/minify css and js automaticly. I also found "CSS JS Booster" http://github.com/Schepp/CSS-JS-Booster maybe it is a better solution to start with?]]>
zhoubin Dec 09, 2015, 08:46 PM https://forums.modx.com/thread/25044/automatic-optimize-minify-css-and-js-files?page=4#dis-post-535657
<![CDATA[Re: Automatic optimize/minify CSS and JS files]]> https://forums.modx.com/thread/25044/automatic-optimize-minify-css-and-js-files?page=4#dis-post-504452
]]>
fourroses666 Jul 24, 2014, 09:09 AM https://forums.modx.com/thread/25044/automatic-optimize-minify-css-and-js-files?page=4#dis-post-504452
<![CDATA[Re: Automatic optimize/minify CSS and JS files]]> https://forums.modx.com/thread/25044/automatic-optimize-minify-css-and-js-files?page=4#dis-post-504419 http://stackoverflow.com/questions/4957446/load-external-css-file-in-body-tag/4957526#comment-26845703

In HTML5, link can only be used within the body if it uses the itemprop attribute instead of rel

The warning of insights means, that there should be less or no delay showing the first view of the page (without a scroll). This could be provided by using two css files. One for the fast display in head and a second one at the end of the body. It is a demanding task, to split the css in this way.

AddHeaderfiles has to be patched somehow to allow 'end' for CSS. Since I have switched CSS/JSfile handling to grunt (in combination with bower + sass), I don't use that package anymore.]]>
Jako Jul 24, 2014, 03:26 AM https://forums.modx.com/thread/25044/automatic-optimize-minify-css-and-js-files?page=4#dis-post-504419
<![CDATA[Re: Automatic optimize/minify CSS and JS files]]> https://forums.modx.com/thread/25044/automatic-optimize-minify-css-and-js-files?page=4#dis-post-504416
http://developers.google.com/speed/pagespeed/insights
https://developers.google.com/speed/docs/insights/OptimizeCSSDelivery

I think when using it like this it is correct: (property and rel)
<link type="text/css" rel="stylesheet" property="stylesheet" href="css/homepage.css" />

]]>
fourroses666 Jul 24, 2014, 03:06 AM https://forums.modx.com/thread/25044/automatic-optimize-minify-css-and-js-files?page=4#dis-post-504416
<![CDATA[Re: Automatic optimize/minify CSS and JS files]]> https://forums.modx.com/thread/25044/automatic-optimize-minify-css-and-js-files?page=4#dis-post-504378
http://stackoverflow.com/questions/1642212/whats-the-difference-if-i-put-css-file-inside-head-or-body]]>
Jako Jul 23, 2014, 04:14 PM https://forums.modx.com/thread/25044/automatic-optimize-minify-css-and-js-files?page=4#dis-post-504378
<![CDATA[Re: Automatic optimize/minify CSS and JS files]]> https://forums.modx.com/thread/25044/automatic-optimize-minify-css-and-js-files?page=3#dis-post-504330 |end work? I would like to place js and css right above the </body>
When I use the below code it doesn't work for CSS but does for JS.

[!Addheaderfiles?addcode=`/assets/templates/a/js/jquery.min.js|end;/assets/templates/a/slider/jquery.glide.js|end;/assets/templates/a/js/retina.js|end;/assets/templates/a/js/hover.js|end;/assets/templates/a/js/garantie.js|end;/assets/templates/a/js/jquery.respontent.min.js|end;/assets/templates/a/royal/js/jquery.easing.1.3.min.js|end;/assets/templates/a/royal/js/royal-slider-8.1.min.js|end;/assets/templates/a/css/jquery.respontent.css|end;/assets/templates/a/css/style.css|end;/assets/templates/a/font/stylesheet.css|end;/assets/templates/a/royal/css/royalslider.css|end;/assets/templates/a/slider/glide.css|end;`!]
]]>
fourroses666 Jul 23, 2014, 10:40 AM https://forums.modx.com/thread/25044/automatic-optimize-minify-css-and-js-files?page=3#dis-post-504330
<![CDATA[Re: Automatic optimize/minify CSS and JS files]]> https://forums.modx.com/thread/25044/automatic-optimize-minify-css-and-js-files?page=3#dis-post-480320
Test files:
[[AddHeaderfiles?addcode=`/assets/templates/site/js/jquery-1.10.1.min.js;/assets/templates/site/js/script2.js;/assets/templates/site/js/script3.js|end;/assets/templates/site/css/style1.css;/assets/templates/site/css/style2.css;/assets/templates/site/css/style3.css`]]


https://github.com/Jako/MinifyRegistered
https://github.com/Jako/AddHeaderfiles

Spits out:
<link href="/min/?f=/assets/templates/site/css/style1.css,/assets/templates/site/css/style2.css,/assets/templates/site/css/style3.css" rel="stylesheet" type="text/css" />
<script src="/min/?f=/assets/templates/site/js/jquery-1.10.1.min.js,/assets/templates/site/js/script2.js,/assets/templates/site/js/script3.js" type="text/javascript"></script>



Glad I got this working now, thx for your effort.]]>
fourroses666 Oct 15, 2013, 03:35 PM https://forums.modx.com/thread/25044/automatic-optimize-minify-css-and-js-files?page=3#dis-post-480320