Minify CSS and JS for Magento - javascript

I have an issue with minifying CSS and Javascript for Magento. Our website now is 1.1 MB large and we want to reduce it to 1 MB (or less than that if it is possible). I used the function "CSS Settings"/"Javascript Settings" in Magento but it effect one of our extensions so I have to unable them. I am wondering is there any other way to minify the CSS/Js by coding or something like that as I do not want to use extension for this matter. I am keen to find another method that can speed up our site because it could help us rank better in Google Search battle. Thank you in advance.

You can minify CSS and Javascript online. Have you tried it ? If not please visit these links - :)
CSS MINIFIER
JAVASCRIPT MINIFIER

Related

Can you combine the JS and CSS code from different plugins into one in wordpress?

I have a wordpress site which works good but has a long average loading time. According to google insights and other benchmarks, my main problem is the JS and CSS code from different plugins installed (like, 40 or so..) but mainly the JS.
Is it possible to combine all the JS into a single file without breaking the entire site and/or plugins? (I need all of them.) Is it also possible to do the same with CSS?
Yes, this is possible, you should use another plugin for that task.
There are several that you can use and it's a matter of personal preference but here are a couple that popped from a quick search.
Merge-Minify-Refresh
"JS & CSS Script Optimizer" is another option.
And probably most popular one.
W3 Total Cache
Yes , You can do it by below plugin.
https://wordpress.org/plugins/w3-total-cache/

NetBeans plugin to check for unused CSS/JavaScript selectors?

Is there a NetBeans plugin to check for unused CSS and JavaScript across a project? I know there are tools such as Dust-Me (for Firefox) to do this online for one page, however I am interesting in perhaps a plugin that can look across multiple files and find unused resources.
Thank you!
I am unaware of any plugin like this written for NetBeans specifically. If you are interested in looking across all the pages in your project, something like Helium is probably as close as it gets.
While not a plugin for your IDE, you load the JS file into your header so it is present in all pages, and it will scan your site and return a list of unused selectors in loaded stylesheets. Hope this helps!

How to solve wordpress website speed issue?

I have a website http://www.provaltech.com , from last few days I am working on speed solution for my website, I have done some r&d , also submitted website In Google PageSpeed Insights http://developers.google.com/speed/pagespeed/insights/
I have found that its showing few errors as follows :
Leverage browser caching
Eliminate Render-blocking JavaScript and CSS
You can check this link developers.google.com/speed/pagespeed/insights/?url=http%3A%2F%2Fwww.provaltech.com%2F&tab=desktop . Here its showing all errors or you can submit my website in that tool & can check the issue.
So, can anyone help me in that? How can I solve these issues, I want to permanently remove these kind of errors.
Looking forward to hear from you experts.
Regards,
Umar
For better page speed and avoid these error you should try following things.
Enable Compression from Cpanel
You are using Wordpress so use any of the cache plugin.
Use header expiry using httaccess or page header.
minimize you scripts (css,js).
Use compressed images (jpegtran,pngout).
This will help you to improve page speed.
1)) Use caching plugin i.e best example is WP- Supercache
2)) Minify all your css and JS files i.e remove the extra white spaces from CSS and JS files.
3)) Compress all your images i.e use a plugin http://wordpress.org/plugins/wp-smushit/ or smush.it

Packaging JavaScript & CSS

I was tasked with figuring out how to package JavaScript and CSS into one file per each. We have a java servlet application and we use JQuery if that makes any difference. We use ant to script our builds, so easy integration with Ant would be nice. We want to do this to reduce caching issues and to reduce number of requests to the servlet.
I found few tools out there, but not sure what are pros/cons of each. Here is the list so far:
JAWR (http://jawr.java.net/)
Juicer
(http://cjohansen.no/en/ruby/juicer_a_css_and_javascript_packaging_tool)
JSBuilder2
(http://www.sencha.com/products/jsbuilder/)
JSLint
(http://code.google.com/p/jslint4java/)
(JavaScript only)
Quilt
(https://github.com/kitgoncharov/quilt)
(JavaScript only)
Do you guys have any recommendations, warnings, advices? Or maybe a better tool/framework?
Thanks in advance!
For JavaScript, the closure compiler integrates with Ant. It can concatenate and minify your JS. You can also use YUI compressor. Here's an example of using YUI compressor with Ant for JS and CSS.
By far my favorite template is HTML5 Biolerplate The build script there is pretty good as a template.
Also, versioned files with long cache times will greatly improve load times.
Replace "being nice" with "a must". You absolutely want something that integrates with your build tool since you do not want to minimize your files manually again and again and again and again and again and again and again and again and again and again.
Jawr - very nice library, makes everything for you, simple to integrate (at least with its Grails PLugin).
The small problem, I havn't found a way (may be it exists) to integrate ALL bundle's dependencies in a single file. (if you don't have dependencies between bundles (modules), you won't regret this decision).

Is there a Magento extension for combining/compressing javascript and css?

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?
Go to System>Configuration>Developer and alter the settings in the Javascript and CSS settings boxes. Ensure that you have correct Configuration Scope set in the top-left of the page for your website/store.
Make sure that you flush the cache after changing the setting.
P.S. The Fooman Speedster extension will also perform this task.
There is also mod_pagespeed which does this for all output from your server but doesn't hurt Magento while it does it.
There are extensions in Magento Connect like JS/CSS Compression minify or on the web like Compressor.
http://www.magentocommerce.com/magento-connect/catalog/product/view/id/10581
this extension works fine and has improved our site's performances to a considerably higher levels...
Think this might help someone...
install mod_pagespeed by google on server zero configuration for your magento.

Categories

Resources