What is the best, safe and 100% free tool to be used on doing these task? It has been asked for many times but I want to ask those experienced user.
To minify CSS, try CSSNano and csso. To minify JavaScript, try UglifyJS. The Closure Compiler is also very effective. You can create a build process that uses these tools to minify and rename the development files and save them to a production directory.
It is important to minify your CSS and minimise JavaScript files so they can load faster on your web pages. There are many reasons why you should minify your CSS and JavaScript: Reduce file size: The more code there is in a file, the larger it will be. Minified code is usually much smaller than the original version.
A Minify button should appear in the status bar when opening a . js or a . css file. You can also run Minify: Document by clicking F1 or CTRL+SHIFT+P .
I use Google Closure Tools, it uses Rhino to intepret your code while modifying it to enusre that it still works after minification. Many free tools exists: YUI Compressor, UglifyJS, etc.
UglifyJS is also good as well, try it here http://marijnhaverbeke.nl/uglifyjs
Google Closure Tools: https://developers.google.com/closure/
if you google minify there are many online minifiers for js - these basically all do the same thing. In terms of CSS there are similar things that will make the files files smaller. You need to be careful doing this with CSS though as you need to measure maintainability against file size - unless of course you auto minify when releasing to live. You still need to be careful as changing the css could have adverse effects to your site.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With