I need to make a feature that will notify a user if the content in the database has changed since it was inserted. I assume it would work somewhat like an eSignature. The two solutions I have come up with (comparing duplicated data and comparing hashes of the data) seem to be relatively inefficient.
Is there a better or more standardized way of doing this?
You can add an another column named isEdited
in you contents_table with default value of 0
. In any update api, you should modify isEdited
to 1
silently from server-side itself. I think this will be standard method even which I use in production level applications.
In client-side, use that isEdited key to indicate users whether the content is edited or not. Thats it.
Any improvements on this is appreciated:)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.