Welcome Guest, Not a member yet? Register   Sign In
Login check messing up in IE
#1

[eluser]Aaron_owen[/eluser]
Hi,

Im new to codeigniter and was wondering if someone can help.

I have set up a controller named "site", which loads a view which is the index page of the website. I have set up the site so users can register and log in all works fine.

If I use chrome or firefox and login to my site then I am forwarded to the "site/index" page which is what I set it too. If I then delete the site/index bit off the end of the address it then forwards to the default controller which is the "site" controller, that works fine.

But then when I use IE and log into my site and delete the site/index bit off the end of the address.... the section where I have applied :

Code:
<?php

$var = $this->session->userdata('id');

if (empty($var)){
    // Text which shows when not logged in here
}else{
    // Text which shows when  logged in here
}
;?>

I get back the text which should show if i'm not logged in and if I then hit f5 then I get the text displaying which should display when I am logged in.

Im stuck lol any ideas?
#2

[eluser]InsiteFX[/eluser]
Click on tools in IE
Internet Options
Under Browsing History click on settings
Check for newer versions of stored pages
Click on every time I visit the webpage.

InsiteFX
#3

[eluser]Aaron_owen[/eluser]
that worked a treat thank you Big Grin, but what happens if someone else uses the site and tries to clear the remainder of the domain and gets the same problem? I cant tell each user to change their IE settings? Sad
#4

[eluser]InsiteFX[/eluser]
Look in the CodeIgniter User Guide you can send your own headers to IE to tell it not to cache pages.

Code:
$this->load->library('user_agent');

if ($this->agent->is_browser('MSIE') || $this->agent->is_browser('Internet Explorer'))
{
    $this->output->set_header('Pragma: no-cache');
    $this->output->set_header('Cache-Control: no-cache, must-revalidate');
    $this->output->set_header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
}

InsiteFX
#5

[eluser]Aaron_owen[/eluser]
ah right will do Big Grin thank you
#6

[eluser]InsiteFX[/eluser]
I just posted the code!

InsiteFX
#7

[eluser]Aaron_owen[/eluser]
My mistake , scrolled down to the last post ... lol thanks




Theme © iAndrew 2016 - Forum software by © MyBB