留言板

Check session via javascrtipt

Jesse Paria,修改在12 年前。

Check session via javascrtipt

Junior Member 帖子: 69 加入日期: 11-3-4 最近的帖子
What is the best practice for checking if the session has timed out via javascript. I want to do a check before calling an Ajax function.

From what I can see there are many ways. I was thinking of checking to see if the following is null:

if (typeof Liferay.Session._sessionExpired === "undefined")


Does anyone see problems with this or have a better way?

BTW: using Liferay 5.2