Истекает заголовки, не работающие для шрифтов woff2

Все остальные заголовки Expires работают правильно, кроме файлов шрифтов.woff2, эти файлы шрифтов загружаются каждый раз, когда в Chrome открывается любая страница моего веб-сайта.

Ниже мой контент.htaccess для apache

# Redirect to https if http
RewriteCond %{HTTPS} off
RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
# Set header if https
Header set Strict-Transport-Security "max-age=31536000" env=HTTPS

#EXPIRES HEADERS
AddType image/svg+xml .svg
AddType application/vnd.ms-fontobject .eot
AddType application/x-font-ttf .ttf
AddType application/x-font-opentype .otf
AddType application/x-font-woff .woff
AddType application/x-font-woff2 .woff2
<ifmodule mod_expires.c>
    ExpiresActive On
    ExpiresDefault "access plus 1 seconds"
    ExpiresByType text/html "access plus 180 seconds"
    ExpiresByType text/css "access plus 72 hours"
    ExpiresByType text/javascript "access plus 72 hours"
    ExpiresByType application/javascript "access plus 72 hours"
    ExpiresByType application/x-javascript "access plus 72 hours"
    ExpiresByType image/gif "access plus 72 hours"
    ExpiresByType image/jpeg "access plus 72 hours"
    ExpiresByType image/jpg "access plus 72 hours"
    ExpiresByType image/png "access plus 72 hours"
    ExpiresByType image/x-icon "access plus 72 hours"
    ExpiresByType image/svg+xml "access plus 72 hours"
    ExpiresByType application/vnd.ms-fontobject "access plus 1 year"
    ExpiresByType application/x-font-ttf "access plus 1 year"
    ExpiresByType application/x-font-opentype "access plus 1 year"
    ExpiresByType application/x-font-woff "access plus 1 year"
    ExpiresByType application/font-woff2 "access plus 1 year"
</ifmodule>

#GZIP COMPRESSION
    SetOutputFilter DEFLATE
    AddOutputFilterByType DEFLATE text/html text/css text/plain text/xml application/x-javascript application/x-httpd-php application/font-woff2
    BrowserMatch ^Mozilla/4 gzip-only-text/html
    BrowserMatch ^Mozilla/4\.0[678] no-gzip
    BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
    BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
    SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip
    Header append Vary User-Agent env=!dont-vary

0 ответов

Другие вопросы по тегам