Welcome Guest, Not a member yet? Register   Sign In
Strange phenomenon, am I alone?
#1

[eluser]ixxalnxxi[/eluser]
It's happened to me on several times on CI that I do something by the book and it doesn't work. I search the forums and user guide only to come up with the same example that I was working off of.

Then I make a slight change that, from what I think, "refreshes" CI's state and then CI realizes a change has been made and updates itself, thus bringing about the change I was originally looking for. After undoing that slight change and being left with the same code that got me no where, I am getting the effect I desired. Does this happen to anyone else?

I feel like there's some sort of caching going on or something but this ends up draining hours of my time figuring out why the code doesn't work when it's actually valid code.

Am I alone in this phenomenon?
#2

[eluser]Fierymind[/eluser]
I think its caching problem with your browser, I'm using CI in real projects since a year and never met this type of bugs (I met a lot of bugs in MY code!!)
#3

[eluser]ixxalnxxi[/eluser]
This problem happened again just now. I defined a serialized array into a constant then attempted to (for about 10 minutes) echo its its length with count() in my controller, however it simply did not work. After echo-ing a value with a specific key successfully and simply undoing my code to the same previous not-working state, the size of the array now started to echo.

I did now know caching was also an issue when working with server side scripting. What can I do to ensure this doesn't happen?
#4

[eluser]Michael Wales[/eluser]
There is server-side caching and local caching - I doubt you are experience server-side caching issues as you would have had to enable that caching your self. You would know that is what is causing the issue.

But, your browser may be storing a copy of the fully rendered page for an abnormally wrong time. Every browser is different, so I would suggest Googling "[your browser] cache" to learn how to clear it and change the settings so it's not caching information for such a long period of time.
#5

[eluser]Phil Sturgeon[/eluser]
In Firefox and IE you can hit Shift + Refresh to force a new load. I had this problem MANY times when developing on an IE only computer which lead to me adding in the following code to my Layout library.

Code:
$this->CI->output->set_header('Expires: Sat, 01 Jan 2000 01: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");

Possibly overkill, but it made me feel better telling IE to go screw itself, and seemed to stop this from occurring.
#6

[eluser]ixxalnxxi[/eluser]
[quote author="pyromaniac" date="1230564752"]In Firefox and IE you can hit Shift + Refresh to force a new load.[/quote]

I didn't know about that, it will be incredibly helpful. Thanks.




Theme © iAndrew 2016 - Forum software by © MyBB