1
<script type="text/javascript">
function atualizarTarefas() {
$("#header").load("<?=site_url('home/notificar/')?>");
}
setInterval("atualizarTarefas()", 1000);
</script>
1
<script type="text/javascript">
function atualizarTarefas() {
$("#header").load("<?=site_url('home/notificar/')?>");
}
setInterval("atualizarTarefas()", 1000);
</script>
Browser other questions tagged php jquery mysql ajax codeigniter
You are not signed in. Login or sign up in order to post.
Has, the best way is using Websockets, however can also use long-Polling, so it remains with an active connection and only ends when there is update, then creates a new. See http://answall.com/questions/9475/notifies%C3%A7%C3%B5es-in-real-time-similar-to-stack-overflow/10109. PHP by default provides support for Websockets, but is not such a simple task, although there are some libraries, you can use websockets using Pubnub, Pusher, Ably.io, Scaledrone, Hydna which will be much easier.
– Inkeliz
okay I’ll try to understand more of the subject, Websockets thanks for the tip!
– Rafael gustavo