What is the difference between Zepto and jQuery 2?

The primary difference between Zepto.js and jQuery are their respective file sizes of Zepto.js's ~20kb (minified, not gzipped) instead of jQuery's ~80kb,And Zepto.js's ~10kb (minified, Gzipped) instead of jQuery's ~30kb. Furthermore, Zepto’s support for browsers such as IE<10 is either lacking or not guaranteed, its target platforms are:

  • Safari 5+ (desktop)
  • Chrome 5+ (desktop)
  • Mozilla Firefox 4+
  • iOS 4+ Safari
  • Android 2.2+ Browser
  • Other WebKit-based browsers/runtimes
  • webOS 1.4.5+ Browser
  • BlackBerry Tablet OS 1.0.7+ Browser
  • Amazon Silk 1.0+
  • Opera 10+
  • Internet Explorer 10+

jquery 2 is ~30kb and zepto is ~10kb when both are gzipped and minified. Non gzipped but minified, jquery 2 is ~80kb and zepto is ~30kb.

Use an analytics program to check the audience for your site. If a significant chunk of your users use IE9, you need jquery and zepto won't fly. If over a few percent use IE8 and lower and you can't face leaving them stranded without your site, you will need to use jquery 1. If you're targetting that last one, I'm sorry - a lot of new shiny toys won't work for you.

If you're building an html5 app for android/ios/phonegap etc then you're primarily targeting webkit, so zepto does give you big size saving. The primary insight and reason for zepto to exist is that when running on webkit only platforms a lot of jquery's cross platform workarounds are simply unnecessary.

Zepto does also add a couple of touch event handlers to assist with mobile dev, but it's mainly the page weight vs platform support you need to think about.


This is a somewhat old question, but I would like to add performance. From what I'd heard, Zepto performed better than jQuery.

This jsPerf shows different results. I can use jQuery's class selection (of a single element) 137% as often, compared to Zepto's. For ID selection, I can use jQuery's 285% as often.

That's a huge deal considering on most applications, DOM interactions are the only performance statistic that matters (other than network requests).

Also looking at that perf, I can see that I could do document.getElementsByClassNAme 8326% as often as jQuery, so we should all ditch all of these if possible :-)