“Cómo evitar la memoria caché del navegador para el sitio de PHP” Código de respuesta

Cómo evitar la memoria caché del navegador para el sitio de PHP

Here, if you want to control it through HTML: do like below Option 1:

<meta http-equiv="expires" content="Sun, 01 Jan 2014 00:00:00 GMT"/>
<meta http-equiv="pragma" content="no-cache" />
  
And if you want to control it through PHP: do it like below Option 2:

header('Expires: Sun, 01 Jan 2014 00:00:00 GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', FALSE);
header('Pragma: no-cache');

AND Option 2 IS ALWAYS BETTER in order to avoid proxy based caching issue.
Clever Cicada

Cache para el sitio web de PHP

# Checks if the file is physically NOT present
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([a-z0-9-]+)+/([a-z0-9-]+)\.html$	/controller.php?partA=$1&partB=$2 [L]
Nasty Narwhal

Respuestas similares a “Cómo evitar la memoria caché del navegador para el sitio de PHP”

Preguntas similares a “Cómo evitar la memoria caché del navegador para el sitio de PHP”

Más respuestas relacionadas con “Cómo evitar la memoria caché del navegador para el sitio de PHP” en PHP

Explore las respuestas de código populares por idioma

Explorar otros lenguajes de código