就事件而言,一般说来,在被称为“......”的数据库中有一个领域,如果它们开立,那是假的,如果是真的。 在一页的负荷上,检查是否向用户发出过任何信息,如果是的话,则装上这些信息,并用JQuery作简短描述。 你还可以定期检查AJAX的小型文字。
As far as new posts go, the traditional way that I ve seen it done (but by no means the best way) is to keep a timestamp of when a user last visited the site. On page load, get every new post/topic that was created after that timestamp, then serialize this data and store it in the database, or in a cookie (if this serialized data already exists, unserialize it, merge the two and reserialize it). If a user visits a topic, get all data from the serialized entry that matches (IE, in the same topic, or the post number) and remove it from the serialized data. Then again on page load or by using an AJAX script, check periodically if they have an unread post on a topic that belong to them (IE, created after their last timestamp value), and use a bit of JQuery to notify them.