html - Does white spaces in CSS/JS/Jquery consumes space? -


i read in sites , here jquery.js , jquery.min.js both same functionally .min 1 has unnecessary characters removed in order make file size smaller. read somewhere whether in minified css or in minified js white spaces removed make smaller.

hence question comes

"does white spaces in css/js/jquery or other programming language or markup language consumes space?"

and if writing custom css or js how can make minified one.? there tool?

yes, whitespace take space. removing or compressing code can yield 95% compression means load faster.

there lot of tools out there. if looking simple test out suggest trying online resource like:

http://refresh-sf.com/

this web interface compress javascript or css. tool uses uglifyjs 2, clean-css , html minifier.

ideally if using sort of modern tooling process grunt or gulp can automate compression part of build process.

google has released version:

https://developers.google.com/speed/docs/insights/minifyresources

you should minify html, css, , javascript resources. minifying html, can use pagespeed insights chrome extension generate optimized version of html code. run analysis against html page , browse 'minify html' rule. click on 'see optimized content' optimized html code. minifying css, can try yui compressor , cssmin.js. minifying javascript, try closure compiler, jsmin or yui compressor. can create build process uses these tools minify , rename development files , save them production directory.

here link google's "getting started closure compiler application" go on how compress files:

https://developers.google.com/closure/compiler/docs/gettingstarted_app


Comments

Popular posts from this blog

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -