jQuery是否是模块化的?如何修剪它? [英] Is jQuery modular? How to trim it down?

查看:61
本文介绍了jQuery是否是模块化的?如何修剪它?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

压缩,jQuery约为70KB大小(未压缩:> 200KB)。我没有看到用jQuery UI排除很少使用的部分。我怎样才能减少jQuery的(压缩和缩小)文件大小?我非常担心,因为拨号线路和慢速机器/浏览器在我的网站用户中非常普遍。

我主要关注的是解析持续时间浏览器中的JavaScript。在较旧的机器上,这需要几百毫秒。网络传输是一次性成本,这使得这一点稍微容忍一些。 有一个 jQuery构建器,您可以使用它来修剪jQuery的某些部分。


Compressed, jQuery is ~70KB in size (uncompressed: >200KB). I did not see a way to exclude rarely used parts of it like with jQuery UI. How can I reduce the (compressed and minified) file size of jQuery? I am quite concerned because dial-up lines and slow machines/browsers are very common among users of my site.

My main concern is parsing duration of the JavaScript in the browser. On older machines this takes hundreds of milliseconds. The network transfer is a one-time cost which makes this slightly more tolerable.

解决方案

There is a jQuery builder which you can use to trim some parts of jQuery.

这篇关于jQuery是否是模块化的?如何修剪它?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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