R World
R World

Reputation: 766

webview android minimize Java script loading time

I am doing hybird JQM application using phone gap. Now to load index.html in webview it takes much time as there are 15-20 java script refences in html.

please suggest approches for minimizing JS loading time or any parallel loading

Upvotes: 0

Views: 676

Answers (2)

Tracker1
Tracker1

Reputation: 19334

Minify & merge your js files into 1-5 files. Currently I use a grunt + uglify via node in my applications for this.

If you're using tightly coupled code, you can do a single file, and use something stronger like google closure compiler for this... I find that uglify + merge is sufficient.


Alternatively, act like it's 2003 and pre-render your pages using server-side postbacks for mobile browsers.

Upvotes: 0

ANonmous Change
ANonmous Change

Reputation: 808

use BackboneJs and RequireJs for asynchronous loading of javascript files

Upvotes: 1

Related Questions