CodeIgniter Forums

Full Version: IE7 HTTP Problem
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[eluser]fouadami[/eluser]
I'm developing an online game system using Codeigniter which is a little bit heavy in content and process. The developing process is almost finished but I've recently encountered an error in working with IE7/IE6.
Every link will come up with a strange problem of loading, for example when I log in the system, IE status says it's connecting to the server and now is getting the response but it suddenly stops processing and stays still in the same page. The problem shows up 1 in 40 or 50 attempts and in the other 39 cases it works perfectly. It sometimes shows up in normal links too! So the problem isn't because of JavaScript or whatever! When I see the Apache log, it has already sent the new pages header's to the IE and even logged in the user, no error is written in database nor in error log.
Any helps?!

Thank you :-)

El Forum

[eluser]Phil Sturgeon[/eluser]
IE7 is caching these pages perhaps?

El Forum

[eluser]fouadami[/eluser]
Thank you pyromaniac.
I've tried the no-cache header and I know it's not caching cause the page doesn't refresh at all!
I've checked the HTTP requests/responses and found the problem! IE is absolutely stupid! When a link is clicked, it sends the HTTP request and even gets the response but when attempting to refresh the page, a JavaScript function which I have written to be run every 5 seconds is invoked! IE then stays at the same page although the JavaScript function is a simple counter!...

El Forum

[eluser]Phil Sturgeon[/eluser]
I found the only way to utterly DESTROY IE7 caching was to use the following in my layout lib.

Code:
$this->CI->output->set_header("HTTP/1.0 200 OK");
$this->CI->output->set_header("HTTP/1.1 200 OK");
$this->CI->output->set_header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
$this->CI->output->set_header("Cache-Control: no-store, no-cache, must-revalidate");
$this->CI->output->set_header("Cache-Control: post-check=0, pre-check=0, max-age=0");
$this->CI->output->set_header('Last-Modified: ' . gmdate( 'D, d M Y H:i:s' ) . ' GMT' );
$this->CI->output->set_header("Pragma: no-cache");

Probably don't need all of that, but it works nicely for me.