Ergebnis 1 bis 2 von 2

Thema: Contao und gehosteter Font im PageSpeed Insights - Browser Caching wie nutzen?

  1. #1
    Contao-Fan
    Registriert seit
    10.11.2010.
    Beiträge
    471

    Standard Contao und gehosteter Font im PageSpeed Insights - Browser Caching wie nutzen?

    Hallo,

    wie setze ich einen selbst gehosteten woff2-Font bei mod_expires.c in der .htaccess ein, damit mir das bei PageSpeed Insights nicht mehr unter "Browser Caching nutzen" um die Ohren fliegt?

    Code:
    <IfModule mod_expires.c>
            ExpiresActive On
            ExpiresDefault "access plus 2 days"
            ExpiresByType text/html "access plus 6 hours"
            ExpiresByType image/gif "access plus 3 months"
            ExpiresByType image/jpeg "access plus 3 months"
            ExpiresByType image/jpg "access plus 3 months"
            ExpiresByType image/png "access plus 3 months"
            ExpiresByType image/x-png "access plus 3 months"
            ExpiresByType text/css "access plus 8 days"
            ExpiresByType text/javascript "access plus 7 days"
            ExpiresByType application/x-javascript "access plus 7 days"
            ExpiresByType application/javascript "access plus 7 days"
            ExpiresByType image/x-icon "access plus 3 months"
            ExpiresByType font/woff2 "access 1 week"
    </IfModule>
    So funktioniert es leider nicht. Vielen Dank für Eure Tipps!

  2. #2
    Administrator Avatar von xchs
    Registriert seit
    19.06.2009.
    Beiträge
    14.557
    User beschenken
    Wunschliste
    Contao-Projekt unterstützen

    Support Contao

    Standard

    Vielleicht so:
    Code:
    <IfModule mod_mime.c>
    
      …
      AddType application/font-woff2 .woff2
      …
    
    </IfModule>
    Code:
    <IfModule mod_expires.c>
      ExpiresActive on
    
      …
      ExpiresByType application/font-woff2 "access plus 1 week"
      …
    
    </IfModule>
    Contao Community Administrator

    [Unterstützungsmöglichkeiten]

Aktive Benutzer

Aktive Benutzer

Aktive Benutzer in diesem Thema: 1 (Registrierte Benutzer: 0, Gäste: 1)

Lesezeichen

Lesezeichen

Berechtigungen

  • Neue Themen erstellen: Nein
  • Themen beantworten: Nein
  • Anhänge hochladen: Nein
  • Beiträge bearbeiten: Nein
  •