글꼴의 만료일을 설정하고 싶습니다. 다음 정의는 apache 2.2.15
에서 작동하지 않습니다.글꼴의 만료일을 설정하는 방법
ExpiresByType application/x-font-woff "access plus 1 month"
ExpiresByType application/font-woff2 "access plus 1 month"
글꼴의 만료일을 설정하고 싶습니다. 다음 정의는 apache 2.2.15
에서 작동하지 않습니다.글꼴의 만료일을 설정하는 방법
ExpiresByType application/x-font-woff "access plus 1 month"
ExpiresByType application/font-woff2 "access plus 1 month"
첫째, 추가 적절한 MIME 타입 정의 :
AddType application/font-sfnt otf ttf
AddType application/font-woff woff
AddType application/font-woff2 woff2
AddType application/vnd.ms-fontobject eot
다음에 구성 라인을 변경 :
ExpiresByType application/font-woff "access plus 1 month"
ExpiresByType application/font-woff2 "access plus 1 month"
ExpiresByType application/font-sfnt "access plus 1 month"
ExpiresByType application/vnd.ms-fontobject "access plus 1 month"
나는 쉽게 특히 Woff mime type changed a few times로, 파일 확장자보다는 내 유형을 사용하여 찾을 수 있습니다.
# Set up caching on font files for 6 months (60 * 60 * 24 * 180 = 15724800)
<filesMatch ".([eE][oO][tT]|[tT][tT][fF]|[sS][vV][gG]|[Ww][Oo][Ff][Ff]|[Ww][Oo][Ff][Ff]2)$">
ExpiresDefault A15724800
Header append Cache-Control "public"
</filesMatch>
좋은. 나는 시도 할 것이다. – user3796291
감사합니다! 그것은 작동합니다. – user3796291
답변에 만족한다면 올바르게 표시하십시오 :) 감사합니다. –