caching - 什么情况下浏览器会缓存<video>文件?

标签 caching .htaccess html video browser-cache

浏览器在什么情况下会缓存文件?有时会,有时不会。如果这里没有人知道,我的下一步将是测试各种文件格式、文件大小和 htaccess 场景。

如果您不知道,您能想到您推荐测试的任何其他变量吗?

提前致谢!

最佳答案

以下工作是指示浏览器缓存文件。最后一行是使服务器传送具有正确 header MIME 类型的 webm 文件所必需的。

# Expires is set to a point we won't reach,
# Cache control will trigger first, 10 days after access
# 10 Days = 60s x 60m x 24hrs x 10days =  864,000
<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

关于caching - 什么情况下浏览器会缓存<video>文件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5111382/

相关文章:

ruby-on-rails - 如何使 Rails caches_page 在 capistrano 部署中存活下来?

c++ - 对两个连续测量进行基准测试时不一致

.htaccess - 将访问者重定向到网站的几个网址的正在 build 中的页面

php - zlib.output_compression off - 如何测试 PHP 压缩是否真的被禁用?

jquery - Bootstrap 轮播无法正常工作

php - 无法找到 css 属性

asp.net - 如何验证ASP.NET MVC OutputCache是​​否可在服务器上正常工作?

python - Django 缓存导致数据库中出现重复键错误?

apache - 如何使用 .htaccess 规则将 .php 重写为 .html?

Javascript 代码在 Mozilla 的同一页面上提交表单