论坛

主页 » Liferay Portal » English » 3. Development

组合视图 统一视图 树状图
讨论主题 [ 上一个 | 下一个 ]
Jesse Paria
Check session via javascrtipt
2012年3月1日 上午11:58
答复

Jesse Paria

等级: Junior Member

帖子: 69

加入日期: 2011年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:

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


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

BTW: using Liferay 5.2