What is the difference between Zepto and jQuery 2?

jantimon picture jantimon · Feb 12, 2013 · Viewed 41.8k times · Source

There are those two similar projects:

Zepto.js

Zepto is a minimalist JavaScript library for modern browsers with a largely jQuery-compatible API.

jQuery 2.0

jQuery 2.0 beta: Here is your taste of the future, a jQuery that can be faster and smaller without the need to support IE 6, 7, or 8. It’s a great choice for platform-specific HTML applications.

Is this only about performance or do they follow different approaches?

Answer

MHD picture MHD · Feb 12, 2013

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+