Diskuze: Expires headers na Apache pre favicon.ico
Člen
Zobrazeno 11 zpráv z 11.
//= Settings::TRACKING_CODE_B ?> //= Settings::TRACKING_CODE ?>
těch možností je víc. Na wikipedii jsou vypsány.
<a href="http://en.wikipedia.org/wiki/ICO_(file_format)#MIME_type">ICO (file format)</a>
Pokud tedy prohlížeče nepoberou image/icon zkusil bych jen image/ico.
No pridal som vsetky typy z wiki (vdaka za link) a pridal som aj typ (vdaka).
Teraz to vypada takto:
<IfModule mime_module>
AddType image/icon .ico
</IfModule>
## EXPIRES CACHING ##
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access 1 year"
ExpiresByType image/jpeg "access 1 year"
ExpiresByType image/gif "access 1 year"
ExpiresByType image/png "access 1 year"
ExpiresByType text/css "access 1 month"
ExpiresByType text/html "access 1 month"
ExpiresByType application/pdf "access 1 month"
ExpiresByType text/x-javascript "access 1 month"
ExpiresByType application/x-shockwave-flash "access 1 month"
ExpiresByType image/vnd.microsoft.icon "access 1 year"
ExpiresByType image/x-icon "access 1 year"
ExpiresByType image/ico "access 1 year"
ExpiresByType text/ico "access 1 year"
ExpiresByType image/icon "access 1 year"
ExpiresByType application/ico "access 1 year"
ExpiresDefault "access 1 month"
</IfModule>
ale stale favicon.ico nema nastavene expires headers
Ahoj, moje .htaccess vypadá takto a v testu jsem uspěl:
<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault A600
ExpiresByType text/html A1
ExpiresByType text/xml A3600
ExpiresByType text/css A604800
ExpiresByType text/javascript A604800
ExpiresByType application/javascript A604800
ExpiresByType image/gif A604800
ExpiresByType image/png A604800
ExpiresByType image/jpg A604800
ExpiresByType image/jpeg A604800
ExpiresByType image/x-icon A604800
ExpiresByType application/vnd.ms-fontobject "access plus 1 year"
ExpiresByType application/x-font-ttf "access plus 1 year"
ExpiresByType application/x-font-opentype "access plus 1 year"
ExpiresByType application/x-font-woff "access plus 1 year"
ExpiresByType image/svg+xml "access plus 1 year"
</IfModule
Příště zkus testovat ne přes YSlow, ale přes developer tools v prohlížeči.
Zobrazeno 11 zpráv z 11.