Welcome Guest, Not a member yet? Register   Sign In
Solution to session data loss when using AJAX
#7

[eluser]slowgary[/eluser]
Hi guys,

This is a great thread and has helped me identify the bug I've been chasing. I did some testing, however, and confirmed that upon return of an ajax call, the browser DOES INDEED get the returned cookie.

Then it occurred to me that the problem could be caused by echo()'ing the JSON data directly, since it's likely that the output is sent before the cookie header... but in my application, I'm using a view to send JSON results.

I'm indeed experiencing the problem, as my application will just randomly invalidate my session and it's definitely during an AJAX call (my login box comes back as the returned AJAX data).

Can anyone shed more light to the cause of this problem? I've found other threads referencing this as well but none seem to conclude anything definitive.

Thanks!


Messages In This Thread
Solution to session data loss when using AJAX - by El Forum - 12-17-2009, 06:15 AM
Solution to session data loss when using AJAX - by El Forum - 12-17-2009, 06:48 AM
Solution to session data loss when using AJAX - by El Forum - 12-17-2009, 07:12 AM
Solution to session data loss when using AJAX - by El Forum - 03-13-2010, 04:17 PM
Solution to session data loss when using AJAX - by El Forum - 05-10-2010, 06:33 AM
Solution to session data loss when using AJAX - by El Forum - 07-27-2010, 12:49 AM
Solution to session data loss when using AJAX - by El Forum - 10-11-2010, 03:31 PM
Solution to session data loss when using AJAX - by El Forum - 10-11-2010, 04:49 PM
Solution to session data loss when using AJAX - by El Forum - 10-11-2010, 05:29 PM
Solution to session data loss when using AJAX - by El Forum - 10-11-2010, 06:47 PM
Solution to session data loss when using AJAX - by El Forum - 10-12-2010, 12:33 AM
Solution to session data loss when using AJAX - by El Forum - 10-12-2010, 06:29 AM
Solution to session data loss when using AJAX - by El Forum - 10-12-2010, 07:52 AM
Solution to session data loss when using AJAX - by El Forum - 10-12-2010, 08:06 AM
Solution to session data loss when using AJAX - by El Forum - 10-12-2010, 08:13 AM
Solution to session data loss when using AJAX - by El Forum - 10-12-2010, 09:03 AM
Solution to session data loss when using AJAX - by El Forum - 10-12-2010, 10:01 AM
Solution to session data loss when using AJAX - by El Forum - 10-13-2010, 03:01 AM
Solution to session data loss when using AJAX - by El Forum - 10-13-2010, 03:18 AM
Solution to session data loss when using AJAX - by El Forum - 01-20-2011, 06:58 AM
Solution to session data loss when using AJAX - by El Forum - 05-18-2011, 05:00 PM
Solution to session data loss when using AJAX - by El Forum - 05-25-2011, 12:21 PM
Solution to session data loss when using AJAX - by El Forum - 05-25-2011, 03:33 PM
Solution to session data loss when using AJAX - by El Forum - 05-25-2011, 03:54 PM
Solution to session data loss when using AJAX - by El Forum - 05-25-2011, 07:33 PM
Solution to session data loss when using AJAX - by El Forum - 05-26-2011, 08:43 AM
Solution to session data loss when using AJAX - by El Forum - 07-11-2011, 06:10 AM
Solution to session data loss when using AJAX - by El Forum - 07-11-2011, 07:43 AM
Solution to session data loss when using AJAX - by El Forum - 07-11-2011, 08:56 AM
Solution to session data loss when using AJAX - by El Forum - 07-11-2011, 01:21 PM
Solution to session data loss when using AJAX - by El Forum - 08-20-2012, 12:05 PM
Solution to session data loss when using AJAX - by El Forum - 08-23-2012, 08:50 AM
Solution to session data loss when using AJAX - by El Forum - 08-23-2012, 10:20 AM
Solution to session data loss when using AJAX - by El Forum - 08-23-2012, 01:00 PM
Solution to session data loss when using AJAX - by El Forum - 08-23-2012, 01:04 PM



Theme © iAndrew 2016 - Forum software by © MyBB