Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Should I minify and combine JS files for my PhoneGap app?

I understand the rationale behind minification etc. when the code is being downloaded by the browser, but in my PhoneGap app it'll be running locally. Is there any point in doing this if all the resources will be local?

like image 276
Alastair Avatar asked Jan 19 '12 13:01

Alastair


1 Answers

Yes, you should still do the minification of the JS code. It won't help with network latency since the files are being loaded locally but minified code is parsed quicker by the browsers JavaScript engine. The quicker the JS is parsed the quicker your users get to use the app.

I would recommend waiting to minify the JS until the last step before your release your app because it is very difficult to debug minified code.

like image 153
Simon MacDonald Avatar answered Oct 21 '22 11:10

Simon MacDonald