PhoneGap应用程序的缩写代码? [英] Minifying code for PhoneGap App?

查看:169
本文介绍了PhoneGap应用程序的缩写代码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在开始构建一个PhoneGap应用程序,我知道为浏览器缩小代码的优势。但是,我想知道是否值得我的HTML,JavaScript和CSS代码为我的PhoneGap应用程序?



我会理解代码运行更快可能更快? p>

此外,如果是这样,有一个应用程序,它会为我做所有这一切吗?
(当我说对我来说,我的意思是在我的机器上一个目录,并缩减代码保存一个.min.js版本?或者是一个简单的文件文件?)



先感谢任何帮助

解决方案

一般来说,不值得做PhoneGap应用程序。缩小对于web应用程序是有益的,因为它减少了每个请求的大小。



使用PhoneGap所有的HTML / JS / CSS将捆绑到应用程序包)并在应用程序安装时下载一次。因此速度不会有任何提高。


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

解决方案

In general it is not worth minifying PhoneGap application. Minifying is beneficial for web application as it reduces size of each request.

With PhoneGap all your HTML/JS/CSS will be bundled into application package (which is compressed btw.) and downloaded once on application install. So there won't be any gains in speed.

这篇关于PhoneGap应用程序的缩写代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆