Scenario is a grid with a list of contacts. User clicks on 'send email' from grid, sends an email. We drop a message in a queue to update some aggregates (which are also displayed on the list).
The problems is after sending the email, the aggregates are not guaranteed to be updated yet.
We could update the count with javascript, but what if they refresh the page and the aggregates have not yet completed?
One approach would be to keep track of the data in a cookie. On a refresh (i.e., page load) you can check for the existence of the cookie and read (and display) its value via JavaScript. The process that updates the aggregates could also read the cookie and update it, if necessary, to ensure the values are in sync once the updates are complete.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With