如果文件不返回源代码,则带宽问题
我想知道如果您定期请求页面,需要多少(或者会浪费任何)带宽?
如果我使用 ajax 每 10 秒获取一个页面,并且该页面没有返回任何源代码,而且它实际上是空的,这会浪费任何带宽吗?
I was wondering how much (or would it waste any) bandwidth if you request a page at regular intervals?
If i used ajax to get a page every 10 seconds and the page returns no sourcecode whats so ever and its literaly empty, does this waste any bandwidth ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
它仍然会在您的 Web 服务器上占用最短的时间,并且 HTTP 请求和响应标头仍然需要在客户端和服务器之间传输,所以是的,它仍然会占用 (最小)带宽量。
It'll still take up a "slot" on your web server for a minimal amount of time, and the HTTP request and response headers still need to be transferred between the client and the server, so yes it'll still take up a (minimal) amount of bandwidth.
我本来也是这么想的。几个字节(如果有),但您仍在调用文件。
I would have thought so. A few bytes if any, but you are still calling a file.
您将获得包含请求和服务器确认的字节。
据推测,Web 服务器将返回 http 状态代码 200(正常)或 204(无响应),因此您将获得相应的标头数据。
You'll have the bytes comprising the request and the acknowledgement from the server.
Presumably the web server would be returning a http status code of 200 (OK) or 204 (No response) so you'll have the header data for that.