GZIP compressie inschakelen voor uw website

Om uw website sneller te maken, is het mogelijk om Gzip-compressie in te schakelen. Standaard staat dit niet aan, omdat het mogelijk problemen kan veroorzaken, maar in de meeste gevallen zal het probleemloos werken.

Het inschakelen is heel eenvoudig. U kunt dan zelf testen of alles nog werkt, en eventueel de compressie zelf weer uitschakelen.

Maak een nieuw bestand genaamd .htaccess in de httpdocs map van uw website aan met de regels hieronder. Als er reeds een .htaccess bestaat voegt u de volgende regels extra toe:

<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/vnd.ms-fontobject
AddOutputFilterByType DEFLATE application/x-font
AddOutputFilterByType DEFLATE application/x-font-opentype
AddOutputFilterByType DEFLATE application/x-font-otf
AddOutputFilterByType DEFLATE application/x-font-truetype
AddOutputFilterByType DEFLATE application/x-font-ttf
AddOutputFilterByType DEFLATE application/x-javascript
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE font/opentype
AddOutputFilterByType DEFLATE font/otf
AddOutputFilterByType DEFLATE font/ttf
AddOutputFilterByType DEFLATE image/svg+xml
AddOutputFilterByType DEFLATE image/x-icon
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/javascript
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/xml
</IfModule>
Controleer eventueel of de compressie goed werkt via bijvoorbeeld https://checkgzipcompression.com/ of http://www.websiteplanet.com/webtools/gzip-compression/Behalve dat de website sneller te downloaden is, bespaart u zo ook op dataverkeer. Vaak kan het wel 60-70% schelen!

Onderwerpen

Gerelateerd

Categorie

Delen





 

Komt u er ondanks deze hulppagina's niet uit? Uiteraard staan wij klaar om u verder te helpen!