奇怪的行为(ajax长轮询通道)“拒绝”从普通浏览器连接?

发布于 2024-11-20 00:33:58 字数 159 浏览 2 评论 0原文

当您复制此链接

http://q55.queue.vkontakte.ru/im639

并将其放置到当前浏览器选项卡时,按 Enter 键,它会“加载”,地址发生变化,但内容仍然相同(您仍然处于这个问题中)。那是什么?这是程序化行为吗?

When you copy this link

http://q55.queue.vkontakte.ru/im639

and place it to currect browser tab, press enter, it does "load", address changes, but content is still the same (you're still in this question). What's that? Is that programmatical behavior ?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

浅忆流年 2024-11-27 00:33:58

我什么也没看到。它不执行任何操作,因为没有任何可用的东西。

alfred@alfred-laptop:~/node/contact$ curl -v http://q55.queue.vkontakte.ru/im639* About to connect() to q55.queue.vkontakte.ru port 80 (#0)
*   Trying 87.240.134.232... connected
* Connected to q55.queue.vkontakte.ru (87.240.134.232) port 80 (#0)
> GET /im639 HTTP/1.1
> User-Agent: curl/7.21.0 (i686-pc-linux-gnu) libcurl/7.21.0 OpenSSL/0.9.8o zlib/1.2.3.4 libidn/1.18
> Host: q55.queue.vkontakte.ru
> Accept: */*
> 
< HTTP/1.1 204 No Content
< Server: nginx/0.7.59
< Date: Mon, 11 Jul 2011 18:49:25 GMT
< Content-Type: text/html
< Connection: keep-alive
< 
* Connection #0 to host q55.queue.vkontakte.ru left intact
* Closing connection #0

我们得到状态码 HTTP/1.1 204 No Content

而且这与长轮询无关,因为连接根本没有挂起。 URL 看起来像是指向一个图像。我无法想象您应该进行长轮询来检索简单的图像。

I am not seeing anything. It does not do anything because nothing is available.

alfred@alfred-laptop:~/node/contact$ curl -v http://q55.queue.vkontakte.ru/im639* About to connect() to q55.queue.vkontakte.ru port 80 (#0)
*   Trying 87.240.134.232... connected
* Connected to q55.queue.vkontakte.ru (87.240.134.232) port 80 (#0)
> GET /im639 HTTP/1.1
> User-Agent: curl/7.21.0 (i686-pc-linux-gnu) libcurl/7.21.0 OpenSSL/0.9.8o zlib/1.2.3.4 libidn/1.18
> Host: q55.queue.vkontakte.ru
> Accept: */*
> 
< HTTP/1.1 204 No Content
< Server: nginx/0.7.59
< Date: Mon, 11 Jul 2011 18:49:25 GMT
< Content-Type: text/html
< Connection: keep-alive
< 
* Connection #0 to host q55.queue.vkontakte.ru left intact
* Closing connection #0

We get status code HTTP/1.1 204 No Content

Also this has nothing to do with long-polling, because the connection is not hanging at all. It looks like the URL is pointing to an image. I can not image you should be doing long-polling for retrieving a simple image.

爱你不解释 2024-11-27 00:33:58

服务器响应 204。请参阅here 解释了在 204 服务器响应上:

如果客户端是用户代理,则它不应更改导致发送请求的文档视图。

The server responds with a 204. See here which explains that on a 204 server response:

If the client is a user agent, it SHOULD NOT change its document view from that which caused the request to be sent.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文