I
I
Iks4Iks2021-11-28 19:15:40
Apache HTTP Server
Iks4Iks, 2021-11-28 19:15:40

How to set up browser caching for fonts?

There are two fonts: fonts/themegrill-icons.woff2 and fonts/fontawesome-webfont.woff2
I just can't set up caching for them, it worked with the rest.
What do I need to add to .htaccess?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Karabanov, 2021-11-28
@Iks4Iks

Add new MIME types to config:

AddType application/font-woff            woff
AddType application/font-woff2           woff2

And add caching settings:
ExpiresByType application/font-woff "access plus 1 month" 
ExpiresByType application/font-woff2 "access plus 1 month"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question