Skip to content

Instantly share code, notes, and snippets.

@r0ckup
r0ckup / .htaccess-caching
Created Mar 30, 2017
Enable Browser Caching (Apache)
View .htaccess-caching
# Browser-Caching aktivieren
<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault "access plus 24 hours"
ExpiresByType text/css "access plus 1 month"
ExpiresByType text/javascript "access plus 1 month"
ExpiresByType text/html "access plus 1 month"
ExpiresByType application/javascript "access plus 1 month"
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
@r0ckup
r0ckup / .htaccess-compression
Last active Mar 30, 2017
Komprimierte Dateiübertragung beim Apache
View .htaccess-compression
# MIME Typen definieren
<ifModule mime.c>
AddType application/vnd.ms-fontobject eot
AddType application/x-font-ttf ttf ttc
AddType font/opentype otf
AddType application/x-font-woff woff woff2
AddType image/svg+xml svg svgz
</ifModule>
# Komprimierung mit mod_gzip
You can’t perform that action at this time.