Session / pages seem to be loaded several times - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Session / pages seem to be loaded several times (/showthread.php?tid=19759) |
Session / pages seem to be loaded several times - El Forum - 06-18-2009 [eluser]tommebasso[/eluser] Hi, I'm really stuck with a problem concerning my sessions and page views. I'm logging each page view in a db-table writing the controller, the function, page-title, session-id, timestamp, browser and ip into a record. My application seems to work fine, but when I look at the records with the logging data I see that certain pages get loaded three or more times; or at least they get logged more times, because it doesn't seem that the browser really reloads the pages. so here's a controller (simplified version): Code: class Motoren extends MY_Controller { and here are some records of my log-table: Code: (page title) (session id) (stamp) (browser) (IP) these are my session config settings: Code: $config['sess_cookie_name'] = 'ci_session'; The function gets called only once per page created, I'm very sure of that. And I verified that the motor only got viewed once. As you can see in the log-records, the session-id and browser change and the stamp differs (it's always about 1 to 3 seconds from one record to the next). And now the fun thing: this happens quite often, but not every time. I have google-maps and google-analytics in my page-view; can it be, that those javascripts trigger those extra Log_model->add-function-calls somehow? I already searched the forum for session-problems, but didn't find anything that would be similar to mine or give me some hint where to look for the solution. Anybody has any idea? |