Getting JSON at client side via AJAX is something i am looking for in my ASP.NET MVC app.
I found Jquery and basic XmlHttpRequest script for the purpose.I know the easiness with dom manipulation is one aspect for Jquery.But concerned with the file size of Jquery.
But still cannot find Why i need to chose and study Jquery over the light weight simple XmlHttpRequest using Javascript.
I want to know which is the best practice i need to follow or is there any thing i am missing other than this.
Thx
JQuery is so common these days that if you reference it from Google’s library, it’s highly likely that people already have it in their browser cache and won’t need to download it anyway.
The size of the JQuery library minified is only 56k, smaller than many images. If it’s also compressed by the webserver, it’s much smaller than that.
The clear advantage to using JQuery is that it has already encapsulated all the basic XHR actions that you will need to do, and done so in a cross-browser environment. So instead of writing potentially buggy, homemade ajax code, you can make your Ajax requests in one line of JQuery javascript.