Skip to content

Instantly share code, notes, and snippets.

@hijonathan
Created December 7, 2012 19:12
Show Gist options
  • Save hijonathan/4235649 to your computer and use it in GitHub Desktop.
Save hijonathan/4235649 to your computer and use it in GitHub Desktop.
Mark a notification as read

In your email:

<img src="https://path/to/mark-as-read?notificationId=1234&source=email" width="1" height="1" />

Bonus server-side:

When that endpoint is hit from an email, delay the response for 5-10s and listen for the connection being terminated early from the client. If they make it past 5-10s, then mark the notification as read. If not, then either they skimmed it or it was a fluke request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment