Question

I'm building an admin panel where several people are entering data for most of the day (it can take almost an hour to fill a whole form) - and I'm adding features / fixing bugs at the same time. So I want to avoid releasing changes and causing them to lose all they've been working on for the last 30 min.

What I'd like to do is to have a message on the page appear just before I'm about to release some changes, telling them to save their work within the next 5 minutes as I'm about to release (or other messages depending on the context). I know I could email everyone but 1) they wouldn't check their emails all the time as opposed to seeing a big flashy message on the page and 2) emails pile up and we don't like that :).

The crucial part is that the message must appear without them reloading the page: it's basically liked an ajax call, except it's pushed from the server and not pulled. It's a website, not a mobile app, and we're using PHP / Codeigniter.

Is that possible and simple? It's not worth a lot of coding effort.

Was it helpful?

Solution

A simple an easy solution is to add a bit of javascript that continuously (e.g. every 30 seconds) polls the server if there is any Notification available to display. For your use case, this should work just fine.

There is no simple solution for true push functionality on the other hand. Here are some other options: http://www.slideshare.net/kingfoo/implementing-comet-using-php

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top