miércoles, 22 de mayo de 2013

Actualizar página en codeigniter


Cambiando las cabeceras conseguimos que se refresque la página sin tener que forzar una recarga de nuestro navegador.

$this->output->set_header("HTTP/1.0 200 OK");
$this->output->set_header("HTTP/1.1 200 OK");
$this->output->set_header('Last-Modified: '.gmdate('D, d M Y H:i:s', $last_update).' GMT');
$this->output->set_header("Cache-Control: no-store, no-cache, must-revalidate");
$this->output->set_header("Cache-Control: post-check=0, pre-check=0");
$this->output->set_header("Pragma: no-cache");

No hay comentarios:

Publicar un comentario

Entradas populares