The Heartbeat API allows for regular communication between the user's browser and the server.
Heartbeat is a simple server polling API that sends XHR (ajax) requests to the server every 15 seconds and triggers events (or callbacks) upon receiving data.
Currently these 'ticks' handle transports for post locking (and warning users when more than one user is attempting to edit a post), login-expiration warnings, autosave, and related tasks while a user is logged in.