2016-05-04 10 views
0

Ich füge den folgenden Code in .htaccess-Datei für Ablauf-Header. Es gilt für alle Dateien, aber nicht für Google Translate CSS- und JS-Dateien.So fügen Sie in der .htaccess-Datei Verfalls-Header hinzu

<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" 
 
ExpiresByType image/svg "access plus 1 month" 
 
# CSS 
 
ExpiresByType text/css "access plus 1 month" 
 
ExpiresByType text/plain "access plus 1 month" 
 
# Javascript 
 
ExpiresByType application/javascript "access plus 1 year" 
 
ExpiresByType application/x-javascript "access plus 1 month" 
 
</IfModule>

Kann jemand erklären, was der Grund dafür ist.

Antwort

0

Versuchen

ExpiresByType text/x-javascript "Zugang 1 Monat"

Verwandte Themen