how does jquery guess the better datatype in Ajax method?

后端 未结 2 1806
栀梦
栀梦 2021-01-18 03:55

it is wriiten in jquery document about Ajax method and its dataType:

\' Default: Intelligent Guess \'

how does jquery guess the better datatype for this meth

2条回答
  •  礼貌的吻别
    2021-01-18 04:30

    Don't rely on jQuery to correctly guess your returned dataType. I was returning text but I was foolishly assuming that text was the default setting without looking at the documentation and my ajax requests would seemingly randomly fail, giving some of my users a bad experience and others would be fine.

    i.e. jQuery cannot reliably intelligently guess text as a dataType.

提交回复
热议问题