如何测试我的服务器是否支持范围请求?
可能的重复:
如何查明服务器是否支持 Range 标头?
我想制作一个 jPlayer 媒体播放器,但它说服务器必须启用 Range 请求。
它说,通过查看服务器的响应是否在其标头中包含 Accept-Ranges 来检查很容易 - 但我不知道如何做这个“简单”的事情。
我认为这与 如何确定服务器是否支持 Range 标头? 但我需要一个关于如何进行测试的分步白痴指南。我无法从这个答案中得出答案。有人可以帮忙吗?我想我需要将一个 php 页面上传到我的服务器,上面有一些代码?
谢谢。
Possible Duplicate:
How can I find out whether a server supports the Range header?
I want to make a jPlayer media player but it says that the server must enable Range requests.
It says that this is easy to check for by seeing if your server's resonse includes the Accept-Ranges in its header - but I don't know how to do this 'easy' thing.
I think it is the same question as How can I find out whether a server supports the Range header? but I need a step by step idiot guide to how to carry out the test. I couldn't work it out from that answer. Can anyone help? I guess I need to upload a php page to my server with some code on it?
Thank you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好吧,显然这就是你可以做到的(感谢 JPlayer 的 Mark Panaghiston)..
在 Chrome/Firefox 中导航到相关服务器上视频的 url 地址(在我的例子中是 mp4)。< /p>
打开开发者工具(在 Chrome 中,快捷键 CTRL-SHIFT-i 或 F12)
切换到开发者的
network
选项卡工具选择有问题的视频/文件
然后单击
标题
选项卡获取信息查看是否有
接受范围:字节
的标头响应如果此
Accept Ranges
具有类似字节的值,则表示范围请求已被接受。OK well apparently this is how you can do it (thanks to Mark Panaghiston at JPlayer for this)..
Navigate to the url address of a video (mp4 in my case) on the server in question in Chrome/Firefox.
Open up the developer tools (in Chrome, shortcut CTRL-SHIFT-i or F12)
Switch to the
network
tab of the developer toolsSelect the video/file in question
Then click for the
Headers
tab for informationLook to see if you have a Header Response for
Accept Ranges: Bytes
If this
Accept Ranges
has a value like bytes, then it means range requests are accepted.