C
Cyber
Épsilon
Te recomiendo probar WordPress › W3 Total Cache « WordPress Plugins
Yo tb llevo mucho tiempo buscando algo asi para mi blog, no consigo cachearlo.
¿Preguntas cómo hacer que el servidor envíe las cabeceras necesarias en la respuesta HTTP para que el navegador cachee la página?
W3 Super Cache, que yo sepa, lo tiene integrado o, al menos, se puede configurar para ello.
Si, eso mismo preguntaba. Pero como le dije a Night en el comentario de arriba, prefiero no usar esos plugs "avanzados". Igual, gracias!! :encouragement:
# 1 YEAR
<filesMatch "\.(ico|pdf|flv)$">
Header set Cache-Control "max-age=29030400, public"
</filesMatch>
# 1 WEEK
<filesMatch "\.(jpg|jpeg|png|gif|swf)$">
Header set Cache-Control "max-age=604800, public"
</filesMatch>
# 2 DAYS
<filesMatch "\.(xml|txt|css|js)$">
Header set Cache-Control "max-age=172800, proxy-revalidate"
</filesMatch>
# 1 MIN
<filesMatch "\.(html|htm|php)$">
Header set Cache-Control "max-age=60, private, proxy-revalidate"
</filesMatch>
No hay problema. Mira, un .htaccess con valores que puedes cambiar. Los valores están en segundos.
¿Necesitas ayuda para entender la sintaxis de estos bloques de ejemplo?Insertar CODE, HTML o PHP:# 1 YEAR <filesMatch "\.(ico|pdf|flv)$"> Header set Cache-Control "max-age=29030400, public" </filesMatch> # 1 WEEK <filesMatch "\.(jpg|jpeg|png|gif|swf)$"> Header set Cache-Control "max-age=604800, public" </filesMatch> # 2 DAYS <filesMatch "\.(xml|txt|css|js)$"> Header set Cache-Control "max-age=172800, proxy-revalidate" </filesMatch> # 1 MIN <filesMatch "\.(html|htm|php)$"> Header set Cache-Control "max-age=60, private, proxy-revalidate" </filesMatch>
public
Indicates that the response MAY be cached by any cache, even if it would normally be non-cacheable or cacheable only within a non- shared cache. (See also Authorization, section 14.8, for additional details.)
private
Indicates that all or part of the response message is intended for a single user and MUST NOT be cached by a shared cache. This allows an origin server to state that the specified parts of the
response are intended for only one user and are not a valid response for requests by other users. A private (non-shared) cache MAY cache the response.
Note: This usage of the word private only controls where the response may be cached, and cannot ensure the privacy of the message content.
no-cache
If the no-cache directive does not specify a field-name, then a cache MUST NOT use the response to satisfy a subsequent request without successful revalidation with the origin server. This allows an origin server to prevent caching even by caches that have been configured to return stale responses to client requests.
If the no-cache directive does specify one or more field-names, then a cache MAY use the response to satisfy a subsequent request, subject to any other restrictions on caching. However, the specified field-name(s) MUST NOT be sent in the response to a subsequent request without successful revalidation with the origin server. This allows an origin server to prevent the re-use of certain header fields in a response, while still allowing caching of the rest of the response.
Note: Most HTTP/1.0 caches will not recognize or obey this directive.
a) la caché de wordpress se activa en el archivo de configuración con un simple "enable" aunque no sé si necesita algún soporte adicional
b) quickache se activa con un clic...
De pronto este artículo te ayude
Usando la caché interna de Wordpress | aNieto2K
Usa algo en la QUERY_STRING. Por ejemplo, si la dirección esDisculpen y aprovecho el thread pero yo tengo un problema de caché en wordpress uso el script de geo ip de adjal y w3 total cache el problema yace en que el script no funciona bien porque se queda en caché la ultima visita antes del barrido 🙁... Es decir que si visitó uno de españa antes el barrido pues a los demás le mostrará anuncios para españa 🙁
http://www.example.com/
http://www.example.com/?nc2=2
Es que, técnicamente, el navegador no distingue entre HTML y PHP: eso lo hace el servidor; el navegador simplemente recibe el archivo y lo interpreta como HTML.Créeme que no sabía que el php se podía cachear en el navegador del usuario, yo pensé que el mismo sólo recibía datos en html y afines.
Por supuesto. Tienes que añadir esto a httpd.conf:Aprovecho, ya que noté que sabes tanto, para preguntarte algo un poco mas "complicado", que hace semanas que intento entender pero no logro. Resulta que la herramienta que mecioné antes, me indica que tengo una falencia grave, y me recomienda "Habilitar Keep-Alive".
KeepAlive On
Sin problemas 🙂
Es que, técnicamente, el navegador no distingue entre HTML y PHP: eso lo hace el servidor; el navegador simplemente recibe el archivo y lo interpreta como HTML.
Por supuesto. Tienes que añadir esto a httpd.conf:
Aunque estoy asumiendo que no estás en alojamiento compartido. En ese caso, no hay manera, a mi entender, de configurar eso sin que el hosting lo añada para todo el servidor.Insertar CODE, HTML o PHP:KeepAlive On
Puedes comprobar el Keep Alive tú mismo: si no ves "Connection: Keep-Alive" entre los headers de tu web, no está configurado de esa manera.
No, para ello necesitas Firebug (veo que ya lo usas) o similar. Son los HTTP headers (cabeceras HTTP) de la respuesta del servidor. También las puedes ver en sitios como View HTTP Request and Response Header
Perfecto!! Muchas gracias por pasarme la herramienta!!!
La respuesta que obtengo es la misma en todos los sitios: Connection: close[CRLF]
Incluso he testeado sitios de otros usuarios "mas profesionales" del foro, y es igual. Así que no creo que sea tan importante ¿o si?
Muchísimas gracias por todo, realmente gracias :encouragement:
Utilizamos cookies y tecnologías similares para los siguientes fines:
¿Aceptas las cookies y estas tecnologías?
Utilizamos cookies y tecnologías similares para los siguientes fines:
¿Aceptas las cookies y estas tecnologías?