Ver Mensaje Individual
  #4 (permalink)  
Antiguo 26/10/2015, 08:38
Avatar de lauser
lauser
Moderator Unix/Linux
 
Fecha de Ingreso: julio-2013
Ubicación: Odessa (Ukrania)
Mensajes: 3.278
Antigüedad: 10 años, 9 meses
Puntos: 401
Respuesta: Especificar caché de navegador ¿Como hacerlo correctamente?

Solo eso?????

Revisa esto:
Código Apache:
Ver original
  1. <ifModule mod_deflate.c>
  2.   AddOutputFilterByType DEFLATE text/html text/xml text/css text/plain
  3.   AddOutputFilterByType DEFLATE image/svg+xml application/xhtml+xml application/xml
  4.   AddOutputFilterByType DEFLATE application/rdf+xml application/rss+xml application/atom+xml
  5.   AddOutputFilterByType DEFLATE text/javascript application/javascript application/x-javascript application/json
  6.   AddOutputFilterByType DEFLATE application/x-font-ttf application/x-font-otf
  7.   AddOutputFilterByType DEFLATE font/truetype font/opentype
  8. </ifModule>
  9.  
  10. <ifModule mod_expires.c>
  11. ExpiresActive On
  12. ExpiresDefault "access plus 300 seconds"
  13. ExpiresByType text/html "access plus 600 seconds"
  14. ExpiresByType image/gif "access plus 604800 seconds"
  15. ExpiresByType image/ico "access plus 604800 seconds"
  16. ExpiresByType image/jpeg "access plus 604800 seconds"
  17. ExpiresByType image/jpg "access plus 604800 seconds"
  18. ExpiresByType image/png "access plus 604800 seconds"
  19. ExpiresByType text/css "access plus 604800 seconds"
  20. ExpiresByType text/javascript "access plus 604800 seconds"
  21. ExpiresByType application/x-javascript "access plus 604800 seconds"
  22. ExpiresByType application/javascript "access plus 604800 seconds"
  23. ExpiresByType application/xhtml+xml "access plus 600 seconds"
  24. </ifModule>
  25.  
  26.  
  27. <ifModule mod_headers.c>
  28. Header set Connection keep-alive   
  29. <filesMatch "\\.(ico|pdf|flv|jpg|jpeg|png|gif|svg|swf)$">
  30. Header set Cache-Control "max-age=2592000, public"
  31. </filesMatch>
  32. <filesMatch "\\.(css)$">
  33. Header set Cache-Control "max-age=604800, public"
  34. </filesMatch>
  35. <filesMatch "\\.(js)$">
  36. Header set Cache-Control "max-age=604800, private"
  37. </filesMatch>
  38. <filesMatch "\\.(xml|txt)$">
  39. Header set Cache-Control "max-age=604800, public, must-revalidate"
  40. </filesMatch>
  41. <filesMatch "\\.(html|htm|php)$">
  42. Header set Cache-Control "max-age=1, private, must-revalidate"
  43. </filesMatch>  
  44. </ifModule>
__________________
Los usuarios que te responden, lo hacen altruistamente y sin ánimo de lucro con el único fin de ayudarte. Se paciente y agradecido.
-SOLOLINUX-