Met GZIP-compressie maak je bepaalde websitebestanden kleiner, zodat ze sneller kunnen worden verstuurd. Gebruik je de Websitemaker of Webshop van Mijndomein, dan wordt compressie automatisch toegepast. Bij WordPress, Joomla of een andere website hangt de manier waarop je GZIP-compressie inschakelt af van je systeem.
Dit artikel geldt voor: Mijndomein-klanten met een Webhosting product die GZIP-compressie willen inschakelen of controleren.
Belangrijke informatie over GZIP-compressie inschakelen
- Bij de Websitemaker en Webshop van Mijndomein wordt GZIP-compressie automatisch toegepast op tekst en afbeeldingen. Je hoeft hiervoor niets in te stellen.
- Bij een CMS, zoals WordPress of Joomla, hangt de manier waarop je compressie inschakelt af van je systeem.
- Maak een back-up van je .htaccess-bestand voordat je de inhoud aanpast.
Hoe schakel ik GZIP-compressie in op mijn website?
Websitemaker of Webshop
Bij de Websitemaker en Webshop van Mijndomein wordt GZIP-compressie automatisch toegepast op tekst en afbeeldingen. Je hoeft hiervoor zelf niets te doen.
WordPress
Bij WordPress kun je een plugin gebruiken om de prestaties van je website te verbeteren. In het oorspronkelijke artikel worden de volgende plugins genoemd:
- W3 Total Cache
- WP Rocket
- WP Super Cache
Controleer in de instellingen en documentatie van de gekozen plugin hoe je GZIP-compressie inschakelt.
Joomla
In Joomla kun je de instellingen voor compressie bekijken via de beheeromgeving. Ga hiervoor naar Systeem, open Algemene instellingen en bekijk het tabblad Server.
Een ander CMS of een website zonder CMS
Je kunt GZIP-compressie mogelijk inschakelen via het .htaccess-bestand van je website. Lees eerst hoe je het .htaccess-bestand vindt en bewerkt.
Maak eerst een back-up van het bestand. Voeg daarna de volgende regels toe aan het .htaccess-bestand:
<IfModule mod_deflate.c> # Compress HTML, CSS, JavaScript, Text, XML and fonts 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/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 # Remove browser bugs (only needed for really old browsers) BrowserMatch ^Mozilla/4 gzip-only-text/html BrowserMatch ^Mozilla/4\.0[678] no-gzip BrowserMatch \bMSIE !no-gzip !gzip-only-text/html Header append Vary User-Agent </IfModule>
Hoe controleer ik of GZIP-compressie werkt?
Je kunt controleren of GZIP-compressie actief is met de GZIP-test van GiftOfSpeed.
De test laat zien of compressie wordt toegepast op je website.