<small id='bFm9R'></small><noframes id='bFm9R'>

    1. <tfoot id='bFm9R'></tfoot>

      1. <i id='bFm9R'><tr id='bFm9R'><dt id='bFm9R'><q id='bFm9R'><span id='bFm9R'><b id='bFm9R'><form id='bFm9R'><ins id='bFm9R'></ins><ul id='bFm9R'></ul><sub id='bFm9R'></sub></form><legend id='bFm9R'></legend><bdo id='bFm9R'><pre id='bFm9R'><center id='bFm9R'></center></pre></bdo></b><th id='bFm9R'></th></span></q></dt></tr></i><div id='bFm9R'><tfoot id='bFm9R'></tfoot><dl id='bFm9R'><fieldset id='bFm9R'></fieldset></dl></div>
        <legend id='bFm9R'><style id='bFm9R'><dir id='bFm9R'><q id='bFm9R'></q></dir></style></legend>

          <bdo id='bFm9R'></bdo><ul id='bFm9R'></ul>

        Google.com 和 clients1.google.com/generate_204

        Google.com and clients1.google.com/generate_204(Google.com 和 clients1.google.com/generate_204)

        <legend id='0ClOk'><style id='0ClOk'><dir id='0ClOk'><q id='0ClOk'></q></dir></style></legend>
        1. <tfoot id='0ClOk'></tfoot>
            <i id='0ClOk'><tr id='0ClOk'><dt id='0ClOk'><q id='0ClOk'><span id='0ClOk'><b id='0ClOk'><form id='0ClOk'><ins id='0ClOk'></ins><ul id='0ClOk'></ul><sub id='0ClOk'></sub></form><legend id='0ClOk'></legend><bdo id='0ClOk'><pre id='0ClOk'><center id='0ClOk'></center></pre></bdo></b><th id='0ClOk'></th></span></q></dt></tr></i><div id='0ClOk'><tfoot id='0ClOk'></tfoot><dl id='0ClOk'><fieldset id='0ClOk'></fieldset></dl></div>
              • <small id='0ClOk'></small><noframes id='0ClOk'>

                  <tbody id='0ClOk'></tbody>
                  <bdo id='0ClOk'></bdo><ul id='0ClOk'></ul>
                • 本文介绍了Google.com 和 clients1.google.com/generate_204的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我在 firebug 中查看 google.com 的网络活动只是因为我很好奇并注意到一个请求返回204 No Content".

                  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."

                  事实证明,204 No Content"的主要目的是允许输入进行操作,而不会导致用户代理的活动文档视图发生变化,尽管任何新的或更新的元信息都应该应用于当前在用户代理的活动视图."随便.

                  It turns out that a 204 No Content "is primarily intended to allow input for actions to take place without causing a change to the user agent's active document view, although any new or updated metainformation SHOULD be applied to the document currently in the user agent's active view." Whatever.

                  我查看了 JS 源代码,发现generate_204"是这样请求的:

                  I've looked into the JS source code and saw that "generate_204" is requested like this:

                  (new Image).src="http://clients1.google.com/generate_204"
                  

                  根本没有变量声明/赋值.

                  No variable declaration/assignment at all.

                  我的第一个想法是它被用来跟踪是否启用了 Javascript.但是无论如何,(new Image).src='...'"调用是从动态加载的外部 JS 文件中调用的,所以这毫无意义.

                  My first idea is that it was being used to track if Javascript is enabled. But the "(new Image).src='...'" call is called from a dynamically loaded external JS file anyway, so that would be pointless.

                  有人对这点可能有任何想法吗?

                  Anyone have any ideas as to what the point could be?

                  更新

                  /generate_204"似乎可用于许多 google 服务/服务器(例如 maps.google.com/generate_204、maps.gstatic.com/generate_204 等...).

                  "/generate_204" appears to be available on many google services/servers (e.g., maps.google.com/generate_204, maps.gstatic.com/generate_204, etc...).

                  您可以通过为您的网络应用可能使用的每个 google 拥有的服务预先获取 generate_204 页面来利用这一点.像这样:

                  You can take advantage of this by pre-fetching the generate_204 pages for each google-owned service your web app may use. Like This:

                  window.onload = function(){
                      var two_o_fours = [
                          // google maps domain ...
                          "http://maps.google.com/generate_204",
                  
                          // google maps images domains ... 
                          "http://mt0.google.com/generate_204",
                          "http://mt1.google.com/generate_204",
                          "http://mt2.google.com/generate_204",
                          "http://mt3.google.com/generate_204",
                  
                          // you can add your own 204 page for your subdomains too!
                          "http://sub.domain.com/generate_204"
                      ];
                      for(var i = 0, l = two_o_fours.length; i < l; ++i){
                          (new Image).src = two_o_fours[i];
                      }
                  };
                  

                  推荐答案

                  就像 Snukker 所说,clients1.google.com 是搜索建议的来源.我的猜测是,他们会在您需要之前发出请求以强制 clients1.google.com 进入您的 DNS 缓存,因此您在第一个真实"请求时的延迟会更短.

                  Like Snukker said, clients1.google.com is where the search suggestions come from. My guess is that they make a request to force clients1.google.com into your DNS cache before you need it, so you will have less latency on the first "real" request.

                  谷歌浏览器已经对页面上的任何链接执行此操作,并且(我认为)当您在地址栏中键入地址时.这似乎是一种让所有浏览器都做同样事情的方法.

                  Google Chrome already does that for any links on a page, and (I think) when you type an address in the location bar. This seems like a way to get all browsers to do the same thing.

                  这篇关于Google.com 和 clients1.google.com/generate_204的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  quot;Status Code:200 OK (from ServiceWorker)quot; in Chrome Network DevTools?(“状态码:200 OK(来自 ServiceWorker)在 Chrome 网络开发工具中?)
                  How to set a header for a HTTP GET request, and trigger file download?(如何为 HTTP GET 请求设置标头并触发文件下载?)
                  Adding custom HTTP headers using JavaScript(使用 JavaScript 添加自定义 HTTP 标头)
                  What is quot;X-Content-Type-Options=nosniffquot;?(什么是“X-Content-Type-Options=nosniff?)
                  SQL Query DocumentDB in Azure Functions by an integer not working(通过整数在 Azure Functions 中 SQL 查询 DocumentDB 不起作用)
                  Azure Functions [JavaScript / Node.js] - HTTP call, good practices(Azure Functions [JavaScript/Node.js] - HTTP 调用,良好实践)

                    <small id='CaXIe'></small><noframes id='CaXIe'>

                    • <bdo id='CaXIe'></bdo><ul id='CaXIe'></ul>
                        • <i id='CaXIe'><tr id='CaXIe'><dt id='CaXIe'><q id='CaXIe'><span id='CaXIe'><b id='CaXIe'><form id='CaXIe'><ins id='CaXIe'></ins><ul id='CaXIe'></ul><sub id='CaXIe'></sub></form><legend id='CaXIe'></legend><bdo id='CaXIe'><pre id='CaXIe'><center id='CaXIe'></center></pre></bdo></b><th id='CaXIe'></th></span></q></dt></tr></i><div id='CaXIe'><tfoot id='CaXIe'></tfoot><dl id='CaXIe'><fieldset id='CaXIe'></fieldset></dl></div>

                            <tfoot id='CaXIe'></tfoot>
                              <tbody id='CaXIe'></tbody>

                            <legend id='CaXIe'><style id='CaXIe'><dir id='CaXIe'><q id='CaXIe'></q></dir></style></legend>