DataType vs ContentType in jquery ajax -
this question has answer here:
what significance of datatype , contenttype in jquery ajax ?
purpose of both in client side request , server side response ?
datatype:
the type of data you're expecting server.
contenttype:
when sending data server, use content type. default "application/x-www-form-urlencoded; charset=utf-8", fine cases. if explicitly pass in content-type $.ajax(), sent server (even if no data sent). w3c xmlhttprequest specification dictates charset utf-8; specifying charset not force browser change encoding.
Comments
Post a Comment