gpt4 book ai didi

javascript - 什么情况下 firefox honor cache expires/headers

转载 作者:可可西里 更新时间:2023-11-01 13:40:03 25 4
gpt4 key购买 nike

Firefox 缓存 10 秒 1.5MB 的视频,但不缓存 50 秒 8.5MB 的视频。我假设它是因为文件大小,但我不确定。什么情况下 firefox 会接受缓存请求?

我正在使用此代码强制缓存 webm 文件:

<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

最佳答案

这里有两个不同的问题。 HTTP 缓存 header 从不可以指定用户代理必须缓存资源,只能指定它不得缓存资源。因此,Firefox 通过不缓存您的视频,不会无法遵守 header 。

但是,对于何时缓存资源,Firefox 显然有一些规则。我不知道它们是什么,但我建议您不要依赖它们。它们可能以相当复杂的方式依赖于运行 Firefox 的平台。

关于javascript - 什么情况下 firefox honor cache expires/headers,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5374193/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com