jquery ajax jsessionid,jquery - JSESSIONID getting changed - Stack Overflow

I have a web app that makes heavy use of jQuery.ajax() and jQGrid. In a typical flow:

User comes to index.html

Does userid/password authentication via ajax

On success, they are directed to home.html

home.html does multiple ajax requests to populate items on the page.

These requests are: getBriefProfile, getAuthenticatedUser and getProperties.

The getProperties call originates from jQGrid that has to display the properties in a table.

I was running into a problem where the getProperties call on the server was not attached to the authenticated session and hence failing. Looking at XHR captures in Chrome/Safari/Firefox developer tools, I see different behavior on different browsers.

In Firefox, I see that all XHR requests submit the correct JSESSIONID cookie, except the getProperites call, which seems to not submit any cookie and thus results in a new session.

In Chrome I see strange Cookie request headers with two values of JSESSIONID:

Cookie:JSESSIONID=hncGp+UQxJ4X+FUEwj-gdejS; JSESSIONID=NCj6wdLOxh3zwutXEvB1UQYr; __utma=199763511.429181615.1314144361.1316197892.1316480513.20; __utmz=199763511.1314144361.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)

I did not even think this was possible.

Any ideas what is going wrong? All XHR requests go to the same context path on the app server.

Thanks.

-Raj

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值