开发者

Bandwidth question if file returns no source code

开发者 https://www.devze.com 2023-02-10 01:17 出处:网络
I was wondering how much(or would it waste any) bandwidth if you request a page at regular intervals?

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 ?


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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消