I am using IS_AJAX but sometimes still get disconnects

#1
[eluser]SPeed_FANat1c[/eluser]
I put

Code:
// Define Ajax Request
define('IS_AJAX', isset($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest');

system/application/config/constants.php

and

Code:
<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');

/**
* ------------------------------------------------------------------------
* CI Session Class Extension.
* ------------------------------------------------------------------------
*
*
*/

class MY_Session extends CI_Session {
   /*
    * Do not update an existing session on ajax calls
    *
    * @access    public
    * @return    void
    */
    public function sess_update()
    {
        if ( ! IS_AJAX)
        {
            parent::sess_update();
        }
    }

    function sess_destroy()
    {
        parent::sess_destroy();

        $this->userdata = array();
    }

}

// ------------------------------------------------------------------------
/* End of file MY_Session.php */
/* Location: ./application/libraries/MY_Session.php */

called it MY_Session.php and added to system/application/libraries

and still get random disconnects. Now more rarely but still. What else can be causing those disconnects?


Messages In This Thread
I am using IS_AJAX but sometimes still get disconnects - by El Forum - 11-16-2010, 08:41 AM
I am using IS_AJAX but sometimes still get disconnects - by El Forum - 11-16-2010, 11:15 AM
I am using IS_AJAX but sometimes still get disconnects - by El Forum - 11-16-2010, 02:36 PM
I am using IS_AJAX but sometimes still get disconnects - by El Forum - 11-16-2010, 02:42 PM
I am using IS_AJAX but sometimes still get disconnects - by El Forum - 11-16-2010, 02:48 PM
I am using IS_AJAX but sometimes still get disconnects - by El Forum - 11-17-2010, 07:11 AM
I am using IS_AJAX but sometimes still get disconnects - by El Forum - 11-19-2010, 02:59 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.