KENNTNISSE · .HTACCESS
Wie man Leverage Browser Caching aktiviert
Zuletzt aktualisiert 2024-11-28
Sobald aktiviert, Browser-Caching will allow visitors to save items from your web page so that they do not need to be downloaded every time they visit your website. This is useful for design elements such as CSS stylesheets und Medieninhalte wie BilderEs ist eine praktische Lösung, wie wenn jemand ein Bild hochlädt, das sich nicht sehr oft auf seine Website ändert.
Dies reduziert die Bandbreite und erhöht die Ladezeiten der Seiten. Um das Browsen zwischen Cache zu ermöglichen, müssen Sie nur diesen Code zu Ihrer .htaccess-Datei hinzufügen:
## EXPIRES CACHING ## <IfModule mod_expires.c> ExpiresActive On ExpiresByType image/jpg "access 1 year" ExpiresByType image/jpeg "access 1 year" ExpiresByType image/gif "access 1 year" ExpiresByType image/png "access 1 year" ExpiresByType text/css "access 1 month" ExpiresByType application/pdf "access 1 month" ExpiresByType text/x-javascript "access 1 month" ExpiresByType application/x-shockwave-flash "access 1 month" ExpiresByType image/x-icon "access 1 year" ExpiresDefault "access 2 days" </IfModule> ## EXPIRES CACHING ##
Sagen Sie uns, was aufbleiben muss.
A short conversation with an engineer. No quote-bot, no callback queue. We'll tell you honestly if we're not the right fit.