jquery - How to prevent CakePHP 3.0 from extending session timeout with ajax requests? -
how can prevent cakephp 3.x extending users session when background ajax calls made server? using jquery's $.ajax() well. i have setinterval running once minute user notifications. application ehr , need maintain strict session timeout. notifications javascript made sessions unlimited because ajax calls extending sessions. i thought saw in cakephp book few weeks ago can't seem find today. thanks, daren generally need handle on own, ie implement own timeout mechanism. how handle it, depends. you want exclude ajax background activity only, need have access request object, , want handle possible. given prerequisites, i'd use dispatcher filter, can extend timeout depending on whether or not current request ajax request, , destroy session before controllers involved. here's basic, pretty self-explantory example, assumes timeout option value set session configuration . src/routing/filter/sessiontimeoutfilter.php namespace app\routing\filter; use c...