I am currently starting to build an PhoneGap application, I know the advantages of minifying code for browsers already. However, I was wondering if it was worth minifying my HTML, JavaScript and CSS code for my PhoneGap application?
I would understand that the code run faster potentially faster?
Also if that is the case is there an application that will do it all for me? (When I say do it for me I mean take a directory on my machine and minify the code saving a .min.js version? or is it a simple file by file?)
Thanks in advance for any help
Well tickle my feet and call me grandma, but I have been minifying the javascript for my phoneGap app, and it most certainly improves performance.
Of course there is barely any difference in terms of the size of the application package. So the one time that a user downloads and installs the app, there is no real gain from minifying.
But every time the user runs the app, having minified javascript does make a difference. Even though the file is local, it still needs to be loaded into the 'browser', and smaller files are loaded faster and will thus start executing earlier.
And chances are you'll have a lot of javascript since most apps want to "do" something instead of just providing passive HTML content.
I'm considering minifying the phonegap.js file itself too. Any thoughts on that are highly appreciated.