简体   繁体   中英

Should Using Compiled JavaScript code in the index.html be the correct practice?

The Sencha Touch examples in the following link: http://dev.sencha.com/deploy/touch/examples/production/index.html have added the compiled JavaScript in all the examples. The direct code is not available for any of the examples.

Is this the correct practice of releasing a Sencha Touch App with compiled JavaScript code embedded in the main html (index.html)?

If yes, please help regarding generating a compiled JavaScript code for Sencha Touch.

Minified ≠ compiled.

By minifying code, you are reducing the amount of bandwidth taken up by sending it to the browser. For mobile devices, this can be important because most carriers limit the amount of data you can receive for a certain price.

It makes no difference to the final result, since it's the same code but less human-readable.

The other point to consider - if you don't minified and combine all JS code into one file browser will have to load 100+ files to work with your app. And loading 100 files 1k each is much much slower then loading 1 file 100k size.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM