I have a .woff file that Varnish is throwing a hit-for-pass on regardless of my VCL configuration. Is there something about this file type that prevents it from being cached?
I'm using Varnish 4.1.3, Ubuntu 14.04.2 LTS, and Apache 2.4.7.
I have a .woff file that Varnish is throwing a hit-for-pass on regardless of my VCL configuration. Is there something about this file type that prevents it from being cached?
I'm using Varnish 4.1.3, Ubuntu 14.04.2 LTS, and Apache 2.4.7.
You have to make Apache send proper Expires header for Varnish to cache those font files. Make changes to your Apache config / .htaccess:
Add proper MIME types for font files:
AddType application/font-woff woff
Specify max expiration that you want Varnish to cache those:
ExpiresByType application/font-woff "access plus 1 month"