Welcome Guest, Not a member yet? Register   Sign In
[SOLVED] Possible Caching Problem
#1

[eluser]cmgmyr[/eluser]
I've upgraded one of my applications this weekend from CI 1.7.3 to Reactor, everything went well except for one possible caching problem.

I have a browse page with multiple records showing a "status" of a each one (read or unread). When I click on a record to read it, the app changes the record to "read" (ok so far). When I click the back button in the browser, it is showing as unread (incorrect because I just read it). I refresh the page and it get's changed to read. The database is being changed when the record is open, but it's just not displaying for some reason until I refresh or go to a different page.

There is no file or database caching enabled within the app. This was working perfectly within 1.7.3. I looked all over the forums and manual, but I couldn't find anything. Does anyone have anything that I could try to get this working again?

Thanks in advance.
#2

[eluser]cmgmyr[/eluser]
*bump* any ideas?
#3

[eluser]CroNiX[/eluser]
Its probably your browser cache, not CI. Normally when you hit the back button on your browser, it pulls the data from its own cache and doesn't reload it from the server.
#4

[eluser]cmgmyr[/eluser]
Thanks for the reply. I don't think it's 100% on the browser's end, as I said before, it was working as expected with 1.7.3. Only after upgrading to Rector was I having the issue. I ended up putting:
Code:
<?
header("Cache-Control: no-cache, no-store, must-revalidate");
header("Pragma: no-cache");
?>
at the beginning of the master view file and it seemed to take care of it. There must be something within the CI output that changed, I just haven't dug into it that much yet. For right now it seemed to fix the problem.

Besides this one thing, the upgrade process went pretty smoothly.




Theme © iAndrew 2016 - Forum software by © MyBB