Google.com and clients1.google.com/generate_204

前端 未结 11 821
梦毁少年i
梦毁少年i 2020-12-07 16:40

I was looking into google.com\'s Net activity in firebug just because I was curious and noticed a request was returning \"204 No Content.\"

It turns out that a 204 N

11条回答
  •  误落风尘
    2020-12-07 17:27

    This documents explains:

    http://docs.lib.purdue.edu/cgi/viewcontent.cgi?article=1417&context=ecetr&sei-redir=1

    (Search for generate204)

    Relevant section:

    Among the different objects, a javascript function triggers a generate204 request sent to the video server that is supposed to serve the video. This starts the video prefetch, which has two main goals: first, it forces the client to perform the DNS resolution of the video server name. Second, it forces the client to open a TCP connection toward the video server. Both help to speed-up the video download phase.

    In addition, the generate204 request has exactly the same format and options of the real video download request, so that the video server is eventually warned that a client will possibly download that video very soon. Note that the video server replies with a 204 No Content response, as implied by the command, and no video content is downloaded so far.

提交回复
热议问题