jQuery's Ajax Data Types

By: Dusty Arlia
Published on Friday, December 6, 2013, 08:03 AM
Last Updated on Saturday, July 11, 2015 at 9:10 PM
Total Updates: 2

jQuery's Ajax functions - jQuery.get(), jQuery.post(), and jQuery.ajax() - can set a dataType property to either text, html, xml, script, json, or jsonp. The client will handle the HTTP response based on this option. If you do not set dataType, jQuery examines the Content-Type header of the HTTP response.