jquery - Prevent PHP SESSION expiration using AJAX -


i know question asked several times have search lot find solution no luck. of urls have visited were:

https://xpapad.wordpress.com/2010/06/19/preventing-session-expiration-with-ajax/

prevent session expired in php session inactive user

php session not refresh using ajax

refresh php session var after ajax request

most of them suggest in order session refresh must place ajax request targeting php script starts session:

window.setinterval( function() {   $.ajax({       cache: false,       type: "get",       url: "refreshsession.php",       success: function(data) {       }   }); }, refreshtime ); 

in refreshsession.php can session_start() .

unfortunately doing session not refresh. ideas why?

ps: before calling session_start() calling custom session name session_name('customsessid').

thanks,

christos


Comments

Popular posts from this blog

android - Pass an Serializable object in AIDL -

How to provide Authorization & Authentication using Asp.net, C#? -

How to use Authorization & Authentication in Asp.net, C#? -