3 ms·
You can store the highest comment id for each article: any comment with an (id > stored highest id for the current article) is new. The hash thing is interesti
by bambax 16y ago
You can store the highest comment id for each article: any comment with an (id > stored highest id for the current article) is new.
The hash thing is interesting for detecting edits, but since comments can be edited only for a limited amount of time (an hour maybe?) it doesn't need to be stored for a long time.
Therefore maybe you could do:
- hash => sessionStorage
- article_id;highest_comment_id => localStorage
- swombat 16y agoThat seems like a very smart approach.