Hello everyone, I think this is my first post here on the forums, so… hi!
I’ve been messing around with CI for about 6 months now… And for the last 2 months, I’ve been working on a porject for a client.
During the development, we discovered that certain pages did not display correctly on some computers, specifically some that were using a Squid proxy. It took me some time to determine what the problem was. But I think I nailed when when I used Firefox’s majestic Firebug.
The setcookie header is… HUGE!
The problem was that the page that couldn’t load was one that had plently of flashdata session variables. And thanks to Firebug I discovered that the session data was stored… like this:
Server response
—HEADER—
setcookie: ci_session=ci_session=a:14:{s:10:“session_id”;s:32:“fb48635c97fcd2ad37a01f31470cad5e”;s:10:“ip_address”;s:12:“200.3.249.98”;s:10:“user_agent”;s:50:“Mozilla/5.0+(X11;+U;+Linux+i686;+es-ES;+rv:1.8.0.9”;s:13:“last_activity”;i:1213985065;s:24:”
... and that appears repeated N times (N being the amount of flash variables that I want to store on the session… including old and new flashdata).
—BODY—
<html>
...
</html>
Pasting that into a wordeditor returned a wooping 22KB just for the session variables!!!
I looked deeper into the session handling class and - I might be totally mistaken about this - it seems to call the setcookie php funcion for every variable I want to save, concatenating each time the variables that were stored before with the new variable!
So, like I said, I might be totally wrong about this… but… is this a problem/bug?
I really need to get this session stuff fixed… so I’m about to pull my sleeves and sit down and hack the session and view codes. Something like setting the cookies just once just before the first view is loaded or something like that (I really should that a look at how the views are actually loaded before I make any other bold statements, shouldn’t I?).
But, besides that tiny detail, CI is fantastic!
Thanks in advance for the aid.
Federico Cáceres