.htaccess - htaccess leverage browser caching for images -



.htaccess - htaccess leverage browser caching for images -

i have code on .htaccess file

## expires caching ## <ifmodule mod_expires.c> expiresactive on # media expiresbytype image/jpg "access plus 1 year" expiresbytype image/jpeg "access plus 1 year" expiresbytype image/gif "access plus 1 year" expiresbytype image/png "access plus 1 year" expiresbytype image/x-icon "access plus 1 year" expiresbytype application/x-shockwave-flash "access plus 1 year" # codes expiresbytype text/css "access plus 1 month" expiresbytype text/x-javascript "access plus 1 month" expiresbytype application/javascript "access plus 1 year" # webfonts expiresbytype application/x-font-ttf "access plus 1 year" expiresbytype font/opentype "access plus 1 year" expiresbytype application/x-font-woff "access plus 1 year" expiresbytype image/svg+xml "access plus 1 year" expiresbytype application/vnd.ms-fontobject "access plus 1 year" expiresdefault "access plus 2 days" </ifmodule> ## expires caching ##

but still having error of "leverage browser caching" when trying test website speed!

when tried view error details:-

before using code above, had lot of links! have png,jpg,js files.

hope can help me.

you need enable mod_expires. apache :

a2enmod expires service apache2 restart

.htaccess caching browser-cache

Comments

Popular posts from this blog

assembly - What is the addressing mode for ld, add, and rjmp instructions? -

vowpalwabbit - Interpreting Vowpal Wabbit results: Why are some lines appended by "h"? -

Is there a way to convert an HTML page styled with Bootstrap CSS into email-compatible html? -