MJM*_*MJM 5 cookies jquery web-services jquery-mobile
我正在使用以下方法将.jQuery Ajax请求发送到.net驱动的Web服务.我的cookie被发送没有任何问题.但是当我尝试强制刷新(Ctrl + F5)时,省略了cookie,请求类型也显示为OPTION
不GET
$.ajax({
type: "GET",
url: url,
data: param,
contentType:"application/json; charset=utf-8",
dataType: "json",
success: successFunc,
error: errorFunc,
beforeSend:function(){$.mobile.loading('show');},
complete:function(){$.mobile.loading('hide');}
});
Run Code Online (Sandbox Code Playgroud)
我的请求在同一个域中,所以我希望同样的域源策略在这里不会有问题.
$.ajax( {
//Just add this code
xhrFields: {
withCredentials: true
}
});
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
591 次 |
最近记录: |