Rabu, 02 November 2016

Add Expires headers .htaccess

Description: Add Expires headers .htaccess
Rating: 4.5
Reviewer: Dugagc
ItemReviewed: Add Expires headers .htaccess

Add Expires headers .htaccess, snippet dari gtmetrik dan css-tricks

Add Expires headers .htaccess gtmetrix.com

<IfModule mod_expires.c>
# Enable expirations
ExpiresActive On 
# Default directive
ExpiresDefault "access plus 1 month"
# My favicon
ExpiresByType image/x-icon "access plus 1 year"
# Images
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType image/jpg "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
# CSS
ExpiresByType text/css "access plus 1 month"
# Javascript
ExpiresByType application/javascript "access plus 1 year"
</IfModule>

Add Expires headers .htaccess css-tricks.com


# BEGIN EXPIRES
<IfModule mod_expires.c>
    ExpiresActive On
    ExpiresDefault "access plus 10 days"
    ExpiresByType text/css "access plus 1 week"
    ExpiresByType text/plain "access plus 1 month"
    ExpiresByType image/gif "access plus 1 month"
    ExpiresByType image/png "access plus 1 month"
    ExpiresByType image/jpeg "access plus 1 month"
    ExpiresByType application/x-javascript "access plus 1 month"
    ExpiresByType application/javascript "access plus 1 week"
    ExpiresByType application/x-icon "access plus 1 year"
</IfModule>
# END EXPIRES

Share on Facebook
Share on Twitter
Share on Google+
Notification ! {New!}
Beberapa artikel di blog ini terkadang berisi informasi dari berbagai macam sumber. Hak cipta berupa gambar, teks, dan link sepenuhnya dimiliki oleh web tersebut.
Tags :

Related : Add Expires headers .htaccess

Ayo sob di komen, kalau ada salah atau saran, kritik boleh coret coret dibawah, gratis kok!