1. File Size comparison
First download jquery and Zepto from CND (http://www.bootcdn.cn/).
jquery Downloads 2.2.4 version compression:
Zepto downloaded is a 1.20 compressed version:
Two File size comparisons:
Jquery.min.js size:83.5k
Zepto.min.js size:25.7k
Summary: Zepto file is really small, but because of the current Internet users mobile device network bandwidth, traffic, browser will be cached JS, and the site will generally use gzip to further compress JS files , so file size will only affect the first time users load the page.
2. jquery and Zepto execution speed comparison
According to the test Web site: Https://jsperf.com/zepto-vs-jquery-2013/25,jquery and Zepto execute at the same speed, the file size does not affect the execution speed .
3, plug-in support situation
Many third-party plugins rely on jqueryand do not support zepto, so using jquery can greatly reduce the cost of maintaining your code .
4. Defects of Zepto
Zepto missing some functions, such as getting the height of functions, selectors, offset functions, and so on, will also add large code maintenance costs .
5. Mobile-side events
When using jquery, you can add plug-ins for mobile events to support mobile events such as touch.
Why we chose jquery instead of Zepto in the mobile side project