Page 1 of 1

Minify JS and CSS

Posted: Fri Aug 30, 2019 9:22 am
by AnandGIBES005
Hi,

In the Joomla admin backend - I have enabled - Optimize CSS & JS - http://prntscr.com/ozj82r

However, as per https://gtmetrix.com/ - it is still suggesting to enable / minify jss and css.

So, please let me know - how to proceed ahead with it.

Regards.

Re: Minify JS and CSS

Posted: Fri Aug 30, 2019 9:52 am
by bruno28
Hello AnandGIBES005

Did you clear the Joomla cache and your browser cache ?

Re: Minify JS and CSS

Posted: Fri Aug 30, 2019 10:07 am
by gws
The gmetrix site offers you the option to download minified css and js.download and replace on your site.

Re: Minify JS and CSS

Posted: Fri Aug 30, 2019 11:29 am
by AnandGIBES005
Yes, I have cleared the Joomla cache and your browser cache and it is still showing - http://prntscr.com/ozl4ve

As you have mentioned - http://prntscr.com/ozl58h
can you please share the url so that I can download it.

Re: Minify JS and CSS

Posted: Fri Aug 30, 2019 12:22 pm
by bruno28
GTmetrix propose you to download minified css and js as gws said on the right of the files with optimized version

gtmetrix.png

And if you want to cite a post, use the cite button above the message instead of doing screenshot, it's easier :)

cite.png

Re: Minify JS and CSS

Posted: Fri Aug 30, 2019 4:50 pm
by john-doe
I'm sorry it this looks like Hijacking but i'm curious about, Is there any plugin that renders the CSS and JS files, minifies them and when you need to edit them via template editor of the backend get straightened so you can edit your file and once saved gets minified for such services.

I know about that since I know that Typo3 CMS has something close to it but i never heard of it for Joomla. Because that might be a solution for this case.

Re: Minify JS and CSS

Posted: Fri Aug 30, 2019 5:07 pm
by bruno28
john-doe wrote:
Fri Aug 30, 2019 4:50 pm
I'm sorry it this looks like Hijacking but i'm curious about, Is there any plugin that renders the CSS and JS files, minifies them and when you need to edit them via template editor of the backend get straightened so you can edit your file and once saved gets minified for such services.

I know about that since I know that Typo3 CMS has something close to it but i never heard of it for Joomla. Because that might be a solution for this case.
Maybe JCH Optimize ?

Re: Minify JS and CSS

Posted: Fri Sep 20, 2019 6:12 am
by Jim Holloman
AnandGIBES005

Can you tell me where to find "Optimize CSS" and "Optimize JS". I do not find either in my Joomla Backup. I am using Ver. 3.9 with the Protostar template.

Re: Minify JS and CSS

Posted: Fri Sep 20, 2019 8:35 am
by gws
Jim Holloman wrote:
Fri Sep 20, 2019 6:12 am
AnandGIBES005

Can you tell me where to find "Optimize CSS" and "Optimize JS". I do not find either in my Joomla Backup. I am using Ver. 3.9 with the Protostar template.
See bruno28 second post.

Re: Minify JS and CSS

Posted: Fri Sep 20, 2019 9:47 am
by bruno28
In the Joomla admin backend - I have enabled - Optimize CSS & JS - http://prntscr.com/ozj82r
Jim Holloman wrote:
Fri Sep 20, 2019 6:12 am
AnandGIBES005

Can you tell me where to find "Optimize CSS" and "Optimize JS". I do not find either in my Joomla Backup. I am using Ver. 3.9 with the Protostar template.
Hello Jim Holloman

I think it is not with Joomla but with his template he could do this

Re: Minify JS and CSS

Posted: Sat Sep 21, 2019 4:30 pm
by Jim Holloman
I found an extension that is closely related:
https://extensions.joomla.org/extension/jch-optimize/

Re: Minify JS and CSS

Posted: Sat Sep 21, 2019 7:58 pm
by helpwithjoomla
We regularly use JCH Optimize. It's a great Extension for optimizing css and js files.

It can be difficult to minimize files NOT hosted on your server like the Google Fonts css file. You could download that css file, optimize it and then save it to your server. That would also require relinking to the file on your server instead of Googles file.

I'd use JCH Optimize and just live with whatever limitations you get.

You already have an "A" for PageSpeed which is really good!

Re: Minify JS and CSS

Posted: Fri Oct 25, 2019 9:42 am
by AnandGIBES005
helpwithjoomla wrote:
Sat Sep 21, 2019 7:58 pm
We regularly use JCH Optimize. It's a great Extension for optimizing css and js files.
I tried to subscribe to JCH optimize their JMSuper Plan but it is showing an error - http://prntscr.com/pny5qk
As mentioned in the error message to try again to subscribe and I did that and again I got the same error message.

I have also sent them this query on their site contact us form - http://prntscr.com/pny70g - but I havent received any reply from their end.

So, please let me know - how to subscribe to it.

Regards.

Re: Minify JS and CSS

Posted: Fri Oct 25, 2019 5:34 pm
by helpwithjoomla
That's an issue with the JCH Optimize web site. They will have to assist you to resolve that issue.

Re: Minify JS and CSS

Posted: Fri Oct 25, 2019 6:41 pm
by sozzled
This is a general comment and it reflects only my personal view.

Have you every wondered why more experienced members—i.e. people who have posted more than 1000 messages—of the forum community do not usually reply to questions about third-party extensions that claim to aggregate/"optimise"/obfuscate or minify JS and CSS on-the-fly? It is not because these extensions do not do what they claim to do. It is also not because more experienced members of this community dispute the "value" in minifying JS or CSS.

This topic was posted in the Performance - Joomla! 3.x. When we discuss performance, are we talking about the processing overhead involved at the server or the perceived "performance" of a website when viewed by the end user? If we're discussing the server overheads, then every plugin, every extra module, every additional piece of PHP that's used to create the HTML adds to the processing "performance". If we're talking about the "performance" of a website as perceived by the end user, there are all sorts of factors involved in that: e.g. what else is the end-user's device doing at the time, network capacity, browser capabilities, etc.

Yes, there are benefits in using minified JS and CSS. I don't think anyone would dispute that. The ways in which JS and CSS is minified, however, is an entirely different discussion. There's a cost in "performance" if JS and CSS is minified on-the-fly and while that cost may not be perceptible to the end-user, these so-called "metrics monitors" only draw part of the overall picture. In the end, it's the site owner who must decide for themselves whether the cost in "optimising" the HTML package is worth the effort put into doing it.

Lastly, do I, personally, use JCH_Optimize? The answer is irrelevant: we're not discussing my website(s) but, for the sake of complete disclosure, I don't use it.

Re: Minify JS and CSS

Posted: Fri Oct 25, 2019 7:17 pm
by helpwithjoomla
Excellent comments sozzled!

I agree with all your points.

When using a tool like Google's PageSpeed or GTMetrix, optimizing css and js is recommended. Thus I think many people want to undertake the optimization. And if organic rankings is important to a person, then you want to do as much as possible to "please" google.

Extensions like JCH Optimize may not be an ideal technical solution, but they are a good option for someone at the novice level.

css and js files can, of course, be manually optimized thus removing the need for those options in JCH. But manual optimization has it's own issues. I usually only do that for sites with content and layout that rarely changes.

Ultimately this posted started with a question about optimizing js and css as suggested by GTMetrix.

We've all just been supplying options.

I would rather reply and give a person an option rather than just not replying at all.

Every user must make their own decisions about how best to proceed.

Re: Minify JS and CSS

Posted: Fri Oct 25, 2019 7:31 pm
by sozzled
Thank you for your reply, @helpwithjoomla. I agree that, for novice users, CSS and JS aggregation solutions may be useful but there can be unintended consequences in using third-party aggregators (e.g. JCH_Optimize). That's not why I was offering my opinion.

As I wrote, this topic was posted in the Performance - Joomla! 3.x forum category and it's important to understand what kind of "performance" we're discussing. Obviously, a website that downloads a hundred images in the HTML package will not perform as well as a one-page website that contains mostly text. Regardless of whether that "text" involves the use of JS or CSS, performance analysers such as the ones you've mentioned will report different conclusions.

In the end, the effort involved in achieving an "A" result may outweigh the value of the website's usefulness to the end-user. It stands to reason that, if the end-user has to wait more than a few seconds before the website's page is displayed, the end-user will probably give up and go somewhere else. In situations where a website produces Mbytes of data that has to be trafficked to its users, CSS and JS optimisation is at the tail end and such tools rarely result in more than a few percent improvement in overall performance.

Every website is different. Everyone's measure of "performance" is probably different, too. Beyond that, I can't say much else. Cheers. 8)