与定时器会话超时 [英] Session time out with Timer

查看:379
本文介绍了与定时器会话超时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想与定时器超时的会议上,
我实施的电子商务项目,当用户添加的第一个产品在购物车中的计时器将开始,用户在购物车中添加更多的产品,但用户未检出特定的时间内,车产品的车会话超时,我需要(车空)。
如何acchive这一点。

I want to time out the session with timer, I am implementing a ecommerce project, where I required when user add first product in the cart a timer will start and user add more products in the cart but user did not checkout the cart product within a specific time the cart session is timeout(cart empty). How can acchive this.

推荐答案

要真正回答这个问题:
在服务器端,当产品被添加到购物保存与它的日期时间戳记。

To actually answer the question: On server side, when a product is added to the cart save the date time stamp with it.

每当任何页面加载,检查日期时间戳。如果您通过接受点,只需删除车数据。

Whenever any page is loaded, check the date time stamp. If it is passed your acceptable point, simply delete the cart data.

这篇关于与定时器会话超时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆