-1

http://www.mysite.ru/images/b1.gif (expiration not specified) How to specify the expiration of files? i did so , create .htaccess roots. And add install cache on 1 week

<IfModule mod_expires.c>
    ExpiresActive On
    #ExpiresDefault "access plus 608 seconds"
    ExpiresByType text/html "access plus 1 seconds"
    ExpiresByType image/x-icon "access plus 2592000 seconds"
    ExpiresByType image/.gif "access plus 2592000 seconds"
    ExpiresByType image/.jpeg "access plus 2592000 seconds"
    ExpiresByType image/.png "access plus 2592000 seconds"
    ExpiresByType text/css "access plus 604800 seconds"
    ExpiresByType text/javascript "access plus 86400 seconds"
    ExpiresByType application/x-javascript "access plus 86400 seconds"
   </IfModule>

what did I do wrong ?

Alexander Kim
  • 11
  • 1
  • 5

1 Answers1

0

Remove "." from the extensions. In other words, use image/gif, image/jpeg and image/png. More information is here

A J
  • 3,970
  • 14
  • 38
  • 53
  • thanks for reply , i did so ExpiresActive On ExpiresByType image/jpg "access 1 week" ExpiresByType image/jpeg "access 1 week" ExpiresByType image/gif "access 1 week" ExpiresByType image/png "access 1 week" ExpiresByType text/x-javascript "access 1 week" ExpiresDefault "access 1 week" but it did not help – Alexander Kim Sep 25 '15 at 09:02
  • Exactly where you are checking it? – A J Sep 25 '15 at 09:05
  • After making any changes, wait for atleast 30 seconds and then check. Also take a look at the solutions provided on this [link](http://stackoverflow.com/questions/6878427/leverage-browser-caching-how-on-apache-or-htaccess) – A J Sep 25 '15 at 09:12
  • I used ExpiresActive On ExpiresByType image/gif A2592000 ExpiresByType image/jpeg A2592000 ExpiresByType image/jpg A2592000 ExpiresByType image/png A2592000 ExpiresByType image/x-icon A2592000 ExpiresByType text/css A86400 ExpiresByType text/javascript A86400 ExpiresByType application/x-shockwave-flash A2592000 Header set Cache-Control "public" wait 30 seconds , but nothing has happened as 78/100 and remains – Alexander Kim Sep 25 '15 at 09:19
  • Is this problem occurring for only GIF files? – A J Sep 25 '15 at 09:21
  • http://www.woodfun.ru/images/wapkaRight.jpg (expiration not specified) http://www.woodfun.ru/ntsaveforms.js (expiration not specified) – Alexander Kim Sep 25 '15 at 09:24
  • Have you added ModPagespeed on ModPagespeedDomain YOUR-DOMAIN before this "expires.c" code – A J Sep 25 '15 at 09:33