Are html5 streamed videos cacheable?

这一生的挚爱 提交于 2020-01-25 19:59:05

问题


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

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...


回答1:


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

A 206 response is cacheable by default; i.e., unless otherwise indicated by explicit cache controls

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



来源:https://stackoverflow.com/questions/37306334/are-html5-streamed-videos-cacheable

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!