GTMetrix - browser caching MP4


#1

htaccess file has:
ExpiresByType video/mp4 “access plus 1 month”

Host says mod_expires is enabled.

CloudFlare is set to “Respect Existing Headers.”

But GTMetrix still says “expiration not specified” for the MP4 video. Why doesn’t it see the caching rule for MP4 files?


#2

Without seeing the headers your host sends, it’s hard to speculate. But you can check them yourself:
curl -svo /dev/null --resolve example.com:443:123.123.123.123 https://example.com/path/file.mp4

Replace the 123s with your origin server’s IP address.


#3

Do you have a cache everything page rule? :logo: doesn’t cache mp4 by default.


#4

Thanks - that was very helpful. When checking via curl, it does show an expiration date 1 month in the future, as specified in my htaccess file. So I guess this ceases to be a CloudFlare question, and is now a question about why GTMetrix doesn’t recognize the header. But I appreciate your help getting this far. Thanks again.


closed #5

This topic was automatically closed after 30 days. New replies are no longer allowed.