-1

I want to use onsen for a mobile web app. Most people seem to use it with phone gap/cordova so that the result can be installed as an app.

Am I going to have performance issues if I use it for a website?

The minified JS alone is 350kb and the css is almost 200kb. I suppose I can gzip it but I just want to make sure I'm not misusing the tool and doing something crazy.

BSMP
  • 4,596
  • 8
  • 33
  • 44
i8abug
  • 1,692
  • 3
  • 19
  • 31

1 Answers1

4

Hmm actually

https://cdn.rawgit.com/OnsenUI/OnsenUI-dist/2.0.0-rc.15/js/onsenui.min.js - 85KB https://cdn.rawgit.com/OnsenUI/OnsenUI-dist/2.0.0-rc.15/css/onsenui.css - 3.2KB https://cdn.rawgit.com/OnsenUI/OnsenUI-dist/2.0.0-rc.15/css/onsen-css-components.css - 25KB

These are the only 3 files which you actually need to use Onsen UI.

If you want to use something like angular, react etc there are additional js files which you may need, but only if you want to use the frameworks.

And of course for the css - if you want to use some sort of icons either font awesome icons or something similar you would need to add those too, but if you're not using them you don't need to serve them.

As for performance issues

  • for loading you can concatenate the files to make less requests (you said you will be gzipping them so I guess you will probably also be doing this)
  • after everything is loaded I don't think you will be able to notice a difference between the app and the webpage.

I may be missing something, but I think this is pretty much it. Basically just include the things which you need - no need to include angular bindings if you're not using angular for example :D

Ilia Yatchev
  • 1,254
  • 7
  • 9