DataType vs ContentType in jquery ajax -


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

Popular posts from this blog

javascript - DIV "hiding" when changing dropdown value -

Does Firefox offer AppleScript support to get URL of windows? -

android - How to install packaged app on Firefox for mobile? -