Welcome Guest, Not a member yet? Register   Sign In
[split] ajax killing sessions?
#2

You can try this:

PHP Code:
/**
 * ------------------------------------------------------------------------
 * CI Session Class Extension for AJAX calls.
 * ------------------------------------------------------------------------
 *
 * ====- Save as application/libraries/MY_Session.php -====
 */

class MY_Session extends CI_Session {
    
    
/**
     * sess_update ()
     * --------------------------------------------------------------------
     *
     * Do not update an existing session on ajax or xajax calls
     *
     * @access    public
     * @return    void
     */
 
   public function sess_update()
    {
        
$ci get_instance();

        if ( ! 
$ci->input->is_ajax_request())
        {
            
parent::sess_update();
        }
 
   }

}    
// End of MY_Session Class.

/* ------------------------------------------------------------------------
 * Filename: MY_Session.php
 * Location: ./application/libraries/MY_Session.php
 * ------------------------------------------------------------------------
 */ 
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply


Messages In This Thread
[split] ajax killing sessions? - by RufusRF - 07-27-2016, 04:40 PM
RE: [split] ajax killing sessions? - by InsiteFX - 07-28-2016, 04:09 AM
RE: [split] ajax killing sessions? - by RufusRF - 07-28-2016, 08:28 AM
RE: [split] ajax killing sessions? - by spjonez - 07-29-2016, 05:41 AM
RE: [split] ajax killing sessions? - by RufusRF - 07-29-2016, 10:16 AM
RE: [split] ajax killing sessions? - by spjonez - 07-29-2016, 10:28 AM
RE: [split] ajax killing sessions? - by RufusRF - 07-30-2016, 01:07 PM



Theme © iAndrew 2016 - Forum software by © MyBB