本文介绍了html5流式视频是否可缓存?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用jwplayer以html5模式播放视频.视频为mp4格式.

I'm using jwplayer to play videos in html5 mode.Videos are in mp4 format.

我在网络"标签中看到的是一堆状态为206(部分下载)的网络请求.因此,我的理解是->视频仅以部分块的形式进行流传输,每个块1-2 Mb.

What I'm seeing in the network tab are bunch of network requests with 206 status (partial download). So my understanding is -> video is just being streamed in partial chunks, 1-2 Mb each.

但是这些块可以缓存在浏览器中吗?目前,我看到视频每次都在重新流式传输...

But can those chunks be cached in the browser?Currently I'm seeing video just being re-streamed every time...

推荐答案

参考此答案:是,206响应是可缓存的.这也在 RFC 7233第4.1节中明确声明:

With reference to this answer: Yes, 206 responses are cacheable. This is also explicitly stated in RFC 7233, section 4.1:

这当然并不意味着浏览器 do 会缓存它们.但是他们当然可以.

This does not mean that browser do cache those, of course. But they certainly can.

这篇关于html5流式视频是否可缓存?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-06 19:07