Minify Javascript using PHP
All those newbie web developers out there might have noticed that javascripts are often written in minified forms. When you try and debug the pages you Google, Facebook etc. It can be noticed that the javascript written there is nowhere close to be understood. This is done deliberately by these tech giants to make it difficult for the developers to decipher their code. Also, it makes the process of fetching the javascript from the server faster. When there are a number of javascripts to be loaded, the individual calls to the javascripts are combined so that a fewer number of server requests can serve the purpose. All this is done by minification of the javascript. There are several ways to minify a javascript. One of them is a two step process to achieve the awesomeness of Google or Facebook like minified javascripts. 1) Minification : In this step, all the line breaks, tabs and white spaces are removed and the javascript is converted into a one line code without any sort of for