本系统已经用在团博商城 可以到其网站参考效果和代码
In chrome, notification had a bug. the onclick and onclose will fail after some
time because of the garbage collections.
var n = window.webkitNotifications.createNotification('ico.gif', 'Title', 'Text');
n.onclick = function(x) { window.focus(); this.cancel(); };
n.show();
In this case the n will be deleted by the garbage collections. The Workaround is try to save a reference of n. like below:
test.push(n), and when onclose event, try to delete the n.
Node.js + express + redis to save the session, when I using monitor in redis-cli, I found lots of operations (get,setex).
some url do not need to care about the session, for example, we use code below to implement:
If some url do not need session operations, we can ignore it by below code:
express.session.ignore.push("/test");
This save lots of resouces,including cpu and memory.