Have you ever heard about the new Heartbeat API that’s being released with WordPress 3.6? It’s coming and it’s going to be a neat addition. For those that do not know, this is what it is among other things:
This will do polling or long-polling so the server is able to send data and notifications to the browser. The primary use will be for setting, monitoring or taking over a post lock. Additionally it will be used to send autosave data to the server. It looks like we won’t need long-polling for now as post locks are not that time sensitive.
Well some enterprising individual (*cough* Alessandro Benoit *cough*) has taken the initiative of providing a real-life example of this in action that begins to show the real potential of what the Heartbeat API can do with his newest plugin:
Based on WordPress 3.6 heartbeat API, Wp Hearbeat Notify, display a realtime custom message to your visitor each time a new post is published with a link redirecting to it. Still in beta version, this plugin has been full tested only on WordPress 3.6-beta3.
As he explains, this implementation is mostly didactic in nature – meaning, it’s meant to help teach, inform, and inspire others to use the API for their own needs. Get a copy of it here.
I think it’s sweet and I could easily see something as simple as this beginning to show up on more blogs as 3.6 matures and (finally) releases. Well done!
No Comments