0

The caching portion of all of the speed tests fail on my site because I am using font files to pull in my fonts.

I am using w3 Total Cache, and KeyCDN.

The font files are hosted in a folder inside the themes folder. I have altered my .htaccess file to allow these fonts to come through the cdn and this seams to be working (the font file type in use by the browser uses the cdn while the file types not in use maintain the actual domain).

I have looked all over google for an idea on how to cache these files but I can't seam to find anything. I am a bit of a novice in this department though so i might not be asking the right questions.

Any ideas?

closed as off-topic by Dave Romsey, bosco, Fayaz, Max Yudin, Robert hue Apr 11 '17 at 19:23

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    If you're using a CDN to serve your fonts, your work is already done. Not sure how this is specifically WordPress related? (it's very much an Apache/server admin/webmasters question) – TheDeadMedic May 12 '16 at 9:44
  • That is what I thought. Only I am using firefox and all of the .woff files are failing to register as cached by all speed testers. The reason I feel this is a wordpress issue is that I am using wordpress, and wordpress plugins. – JSum May 12 '16 at 11:20
  • This might be what you're looking for: wordpress.org/support/topic/browser-caching-of-woff-files – cjbj May 12 '16 at 11:38
  • 1
    Whilst you might be using WordPress for this project, the problem has nothing to do with WordPress. A bit of googling suggests this is a known problem – TheDeadMedic May 12 '16 at 11:40
  • My only form of caching is W3 Total Cache which is a Wordpress plugin. being the case, I am trying to find out how to get W3 Total Cache to cache my font files. This is a Wordpress problem. – JSum May 13 '16 at 4:49
1

In nearly all of the case WP doesn't participate in serving static files. Its rewrite rules are typically configured to ignore them and let web server handle.

Otherwise overhead of firing up PHP engine and WP core for each static request would be incredibly taxing.

As such there is no mechanism in WP to deal with caching issues for static files (outside of some concatenation of admin assets for core use only).

Not the answer you're looking for? Browse other questions tagged or ask your own question.