CodeIgniter中使用ajax调用在sess_expiration和sess_time_to_update之间的关系? [英] relation between sess_expiration and sess_time_to_update with ajax call in codeIgniter?
问题描述
我对php / codeIgniter中的 sess_time_to_update
对 sess_expiration
时间的影响感到困惑,因为我的网站是永远不会更改其url或永远不会刷新/重新加载页面(所有内容都构建在ajax中),在这种情况下,对 sess_expiration
也会产生什么影响。
I'm bit confused about the effect on sess_expiration
time with sess_time_to_update
in php/codeIgniter, Since my website will never change its url or never refresh/reload the page by itself (everything build in ajax), what will be the effect on sess_expiration
in this situation also.
我是php / CodeIgniter的新手,对上述内容的简单而详细的解释将是可理解的。
I'm new to php/CodeIgniter simple and detailed explanation about the above will be appreciable.
推荐答案
CodeIgniter的会话类将基于 sess_time_to_update
自动重新生成其会话ID。片刻之间。 sess_expiration
是会话从上一次操作/页面加载开始应持续的时间,以秒为单位。
CodeIgniter's session class will automatically regenerate it's session ID based on sess_time_to_update
in seconds. The sess_expiration
is how long the session should last from the last action/page load, again set in seconds.
假设CodeIgniter正在处理AJAX请求,您的应用程序仅是AJAX并不重要,它仍然使用相同的会话,因此该会话将继续进行,直到最后一个操作/页面加载大于 sess_expiration
秒前。
It does not matter that your application is AJAX only, assuming CodeIgniter is handling the AJAX requests, it still uses the same session and therefore the session will continue until the last action/page load was greater than sess_expiration
seconds ago.
CodeIgniter会不时地重新生成其会话ID,以此作为防止会话固定的安全措施。这不会影响您的应用程序。
有关会话固定的更多信息: http://en.wikipedia.org/wiki/Session_fixation
CodeIgniter regenerates it's session ID every now and again as a security measure to prevent session fixation. This is not something that should affect your application. More on session fixation: http://en.wikipedia.org/wiki/Session_fixation
这篇关于CodeIgniter中使用ajax调用在sess_expiration和sess_time_to_update之间的关系?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!