Ver Mensaje Individual
  #1 (permalink)  
Antiguo 04/02/2015, 17:30
yonineitor
 
Fecha de Ingreso: diciembre-2012
Mensajes: 69
Antigüedad: 11 años, 4 meses
Puntos: 0
Configuracion htaccess accept-encoding

Existe una manera de validar el htacces para ver que funcione correctamente.

Actualmente tengo 2 archivos externos que los tengo en un src de javascript
Estos archivos me los desplega el pagespeedinsights como retraso.

Especificar una cabecera "Vary" con el valor "Accept-Encoding"

Actualmente tengo asi el htaccess

Código Apache:
Ver original
  1. # BEGIN GZIP
  2. <ifmodule mod_deflate.c>
  3.        
  4.     AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript
  5.  
  6.     <filesMatch "\.(css|js|x?html?|php)$">
  7.         SetOutputFilter DEFLATE
  8.     </filesMatch>
  9.  
  10. </ifmodule>
  11. # END Compress text files
  12.  
  13.  
  14. # BEGIN EXPIRES
  15. <IfModule mod_expires.c>
  16.     ExpiresActive On
  17.     ExpiresDefault "access plus 10 days"
  18.     ExpiresByType text/css "access plus 1 week"
  19.     ExpiresByType text/plain "access plus 1 month"
  20.     ExpiresByType image/gif "access plus 1 month"
  21.     ExpiresByType image/png "access plus 1 month"
  22.     ExpiresByType image/jpeg "access plus 1 month"
  23.     ExpiresByType application/x-javascript "access plus 1 month"
  24.     ExpiresByType application/javascript "access plus 1 week"
  25.     ExpiresByType application/x-icon "access plus 1 year"  
  26. </IfModule>
  27. # END EXPIRES
  28.  
  29. #### Cache
  30. <IfModule mod_headers.c>
  31.     # anual
  32.     <FilesMatch "\.(ico|gif|jpg|jpeg|png|flv|pdf|woff|eot|svg|ttf|flv|swf)$">
  33.         Header set Cache-Control "public, max-age=29030400"
  34.     </FilesMatch>
  35.     # mes
  36.     <FilesMatch "\.(js|css|xml|gz|htc)$">
  37.         Header append Vary: Accept-Encoding
  38.     </FilesMatch>
  39.     #<FilesMatch "\.(js|css|htc|xml|gz)$">
  40.         #Header set Cache-Control "public, max-age=2419200"
  41.         #Header append Vary: Accept-Encoding
  42.     #</FilesMatch>
  43.     # semana
  44.     <FilesMatch "\.(html|htm|txt|html5|phtml)$">
  45.         Header set Cache-Control "max-age=604800"
  46.     </FilesMatch>
  47.     # no cachear
  48.     <FilesMatch "\.(php|pl|cgi|spl)$">
  49.         Header unset Cache-Control
  50.         Header unset Expires
  51.         Header unset Last-Modified
  52.         FileETag None
  53.         Header unset Pragma
  54.     </FilesMatch>
  55. </IfModule>
  56.  
  57. # END Cache-Control Headers
  58.  
  59.  
  60.        
  61. # BEGIN WordPress
  62. <IfModule mod_rewrite.c>
  63.    
  64.     RewriteEngine On
  65.     RewriteBase /
  66.     RewriteRule ^index\.php$ - [L]
  67.  
  68.     RewriteCond %{HTTP:Accept-encoding} gzip
  69.        
  70.     RewriteCond %{REQUEST_FILENAME} !-f
  71.     RewriteCond %{REQUEST_FILENAME} !-d
  72.        
  73.     RewriteRule . /index.php [L]
  74. </IfModule>
  75. # END WordPress


mas sin embargo los archivos que son agregados externos me los marca como que no cuentan con vary y no tienen especificado el cache.
Existe algo que se pueda hacer para completar estos campos solicitados por google?