Safari 5 reseting session cookies with jQuery HTTP request
I have an application that uses jQuery to make an infinite scroll (that you scroll to the bottom and it loads more content). When the user hits the bottom, I need to perform an HTTP request in my server to get more data for that user.
I'm using $.get(); to perform the HTTP request. It works nicely in Chrome and Firefox, but in Safari, it just don't work. When I perform the HTTP request with it, the cookies that stores the user session is reseted, and I can't get user's data or perform any other HTTP request that needs to verify user's session.
My friend told me to change the $.get(); to $.post();, because cookies would work in HTTP POST instead of GET. I had no luck and it still doesn't work.
My jQuery version is 1.4.4 and Safari i开发者_运维百科s version 5.0.3.
I hope someone can help me, this problem is freaking me out :(
Thanks,
Pedro.
I have been answering this all over the place because it tripped me up for so long - Sessions won't survive a change from www.example.com to example.com or vice versa.
IF you are using a full url (*http://www.example.com/get_file.php* as opposed to */get_file.php*" for your get request, this could be your problem.
精彩评论