Skip to content

Instantly share code, notes, and snippets.

View lostmahbles's full-sized avatar

Bryan Marble lostmahbles

View GitHub Profile
@hijonathan
hijonathan / notifications.md
Created December 7, 2012 19:12
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.