4 ms·
I disagree, jQuery is awesome, even for seasoned web developers. Of course you don't need it, but it makes life a lot easier when working with XHR, events, sele
by nathan_f77 12y ago
I disagree, jQuery is awesome, even for seasoned web developers. Of course you don't need it, but it makes life a lot easier when working with XHR, events, selectors, etc.
If you're worried about dependencies, you could just compile your released library with the Google Closure compile, and strip out everything you don't use. You could even set up a pipeline to produce two releases: one that has bits of jQuery embedded, and a smaller one that requires jQuery.
EDIT: Thanks to dmethvin [1], I just learned that you can also build your own jQuery [2] that only includes the modules you need.
[1] https://news.ycombinator.com/item?id=8760352 https://news.ycombinator.com/item?id=8760352
[2] https://github.com/jquery/jquery#modules https://github.com/jquery/jquery#modules
- bjourne 12y agoIt's better to just use one of the jquery versions hosted on the google developer cdn: https://developers.google.com/speed/libraries/devguide https://developers.google.com/speed/libraries/devguide If you link to a popular jquery version, I bet the odds of the user already having the library cached is approaching 95%+ so your dependency is essentially free as no requests will be made in that case.
- LocalPCGuy 12y agoThe odds approach 1.7%. http://www.i-technology.net/2013/11/the-myth-of-cdn.html http://www.i-technology.net/2013/11/the-myth-of-cdn.html more data: http://www.stevesouders.com/blog/2013/03/18/http-archive-jquery/ http://www.stevesouders.com/blog/2013/03/18/http-archive-jqu...