Welcome Guest, Not a member yet? Register   Sign In
How to refresh page when back button of browser is clicked
#21

[eluser]CroNiX[/eluser]
[quote author="rei" date="1343571225"]Thank you very much sir! I really appreciate your time in helping me Smile

I cant believe it solved my problem. The browser now reloads when I click the back button in FireFox, Chrome, IE7 to 9. However the problem still exists in opera mini browser. Damn. But stil thank you very much! Smile

Based on my research cache expirations still depends on the browser if they want to follow the instruction. FF, Chrome, IE7-9 follows it. Only Opera mini doesn't. Safari not tested yet[/quote]
Welcome to the wonderful world of web development, where no one (browser manufacturers) follows standards so we have messes like this.

I wouldn't worry too much about if it works in Opera. No one uses it, or very few. Certainly not enough to justify spending time (money) getting things to work in it, imo. At least none of my clients want me wasting time on it.
#22

[eluser]rei[/eluser]
Yes it is frustrating :/ tsk.

Nwei sir I can't ignore the problem because, It will break the logic of the online exam system that I'm planning to build. Because questions must be shown to the user 1 at a time and the user is not allowed to go back to the previous questions.
#23

[eluser]Unknown[/eluser]
$this->output->set_header("Expires: Tue, 01 Jan 2000 00:00:00 GMT");
$this->output->set_header("Last-Modified: " . gmdate("D, d M Y H:iConfused") . " GMT");
$this->output->set_header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0");
$this->output->set_header("Cache-Control: post-check=0, pre-check=0", false);
$this->output->set_header("Pragma: no-cache");

Where should i put this code?
#24

[eluser]rei[/eluser]
You can put it in the constructor of your controllers.
#25

[eluser]Unknown[/eluser]
Dear Rei,

Could you please elaborate on how to put it in the constructor of the controllers please? Thank you.




Theme © iAndrew 2016 - Forum software by © MyBB