Welcome Guest, Not a member yet? Register   Sign In
Internet Explorer 7 + Ajax + Session Destroy = Broke?

I have a logout link that uses jquery to load the logout page with $.get. This works with firefox, ie8, and chrome. When I put ie8 in ie7 mode, the session isnt destroyed using $.get. However if I go to www.mysite.com/logout, the session is destroyed. Any help would be appreciated


logout.php controller
function index()

$config['sess_cookie_name']        = 'ec_session';
$config['sess_expiration']        = 7200;
$config['sess_encrypt_cookie']    = TRUE;
$config['sess_use_database']    = FALSE;
$config['sess_table_name']        = 'ci_sessions';
$config['sess_match_ip']        = FALSE;
$config['sess_match_useragent']    = FALSE;
$config['sess_time_to_update']     = 300;

$config['cookie_prefix']    = "";
$config['cookie_domain']    = "";
$config['cookie_path']        = "/";

[eluser]Frank Berger[/eluser]
Frankly, you find me surprised that it works in all the other browsers... why don't you just do a link to http://mysite/logout or a [removed].href=http://mysite/logout ?

I imagine that you do checks via ajax if and how one needs to be logged out, in that case i would do it like this:

$.get('/checkmylogout',function (data) { //this returns json in my case

  if (data.logout) {
} else {
   // whatever u wanna do in the other case

I mean.. either the session is due for termination or not.. why leave the user on a basically still valid page, just to realize on the next click 'hey you been logged out' - i hate when that happens


They wanted the user to be able to login and log out of their account without leaving the page, flash video is a big part of the site. Adding a redirect to the logout controller seems to have gotten it working in ie7 mode.

[eluser]Tom Schlick[/eluser]
[quote author="Frank Berger" date="1242963426"]Frankly, you find me surprised that it works in all the other browsers... [/quote]

really? your surprised that IE is the devil and loves to throw problems at web developers that no other browser does? haha i fucking HATE IE ... DIE IE DIE!!!!

Theme © iAndrew 2016 - Forum software by © MyBB