Hispanitat nº 7 Local C

08225, Terrassa (Barcelona)

+34 600 676 872

Soporte Técnico

Lunes-Viernes: 9:30 a 13:30 - 16:30 a 20:00

Sábados a convenir

Forum breadcrumbs - You are here:ForoCategoría principal: wordpressexpire headers
Por favor, o Regístrate para crear mensajes y debates.

expire headers

Add expires headers to .htaccess file

.htaccess is often a hidden file found in your root directory. Before you make any changes to it, make sure you have an extra copy.

Now go to your website’s root and download your .htaccess file, if this file is hidden for you, you may have to use FTP to enable the “Show Hidden files” option.

Once you have downloaded the file, open your .htaccess in any editor (notepad or notepad++) and add the code below:

## EXPIRES CACHING ##
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType text/css "access plus 1 month"
ExpiresByType application/pdf "access plus 1 month"
ExpiresByType text/x-javascript "access plus 1 month"
ExpiresByType application/x-shockwave-flash "access plus 1 month"
ExpiresByType image/x-icon "access plus 1 year"
ExpiresDefault "access plus 2 days"
</IfModule>
## EXPIRES CACHING ##
WhatsApp chat