i create a login page with codeigniter 3. my captcha code works perfect in firefox and other modern browsers. but in internet explorer if you refresh the page it DOESN'T CHANGE. whats wrong with my codes?
Here is the link to the page: http://www.artavil.ir/myadmin/
My captcha code:
function create(){
$rand = rand(1000,9999);
$config_captcha = array(
'word' => $rand,
'img_path'=> './captcha_pic/',
'img_url'=> 'http://artavil.ir/myadmin/captcha_pic/',
'img_width' =>'150',
'img_height' =>'30',
'expiration' => 7200
);
$captcha = create_captcha($config_captcha);
echo $captcha['image'];
}
Chances are it's getting cached. Try this in your JS to prevent caching: