Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Under what conditions does firefox honor cache expires / headers

Firefox is caching 10sec 1.5MB videos but not 50sec 8.5MB videos. I assume its because of the file size, but I'm not sure. Under what conditions does firefox honor caching requests?

I'm using this code to force caching of webm files:

<FilesMatch "\.(webm|ogg|mp4)$">
Header set Expires "Mon, 27 Mar 2038 13:33:37 GMT"
Header set Cache-Control "max-age=864000"
</FilesMatch>
AddType video/webm .webm
like image 678
Matrym Avatar asked Dec 07 '25 09:12

Matrym


1 Answers

There's two different questions here. HTTP cache headers can never specify that a user-agent must cache a resource, only that it must not cache a resource. So Firefox, by not caching your video, is not failing to honour the headers.

However, Firefox clearly has some rules about when to cache resources. I don't know what they are, but I recommend that you don't rely on them. They are likely to depend on the platform on which Firefox is running in quite intricate ways.

like image 141
Alohci Avatar answered Dec 10 '25 00:12

Alohci



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!