Chrome Prerender功能每次都会取消 [英] Chrome Prerender feature gets canceled every time

查看:325
本文介绍了Chrome Prerender功能每次都会取消的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在chrome中使用prerender功能,但是当我检查网络时,我可以看到请求被取消了,无法进行任何链接。





我使用以下语法:

 < link rel =prerenderhref =http://example.org/index html的> 

我在 http://prerender-test.appspot.com/ ,并得到相同的结果。
为什么会这样?



更新(来自 https://developers.google.com/chrome/whitepapers/prerender ):



在某些情况下,预渲染站点时,Chrome可能会遇到可能导致用户可见行为不正确的情况。在这些情况下,prerender将被无声中止。其中一些情况包括:


  • 注意:这不是一个详尽的列表。最后更新11/10/11。


    1. URL启动一个下载

    2. HTMLAudio或Video in

    3. POST,PUT和DELETE XMLHTTPRequests

    4. HTTP身份验证

    5. HTTPS网页

    6. 触发恶意软件警告的页面
    7. 弹出窗口创建
    8. 检测高资源利用率

    9. 开发人员工具已打开

    10. 插件(如Flash)将延迟初始化,直到用户实际访问预渲染页面为止。




但是问题是可以我使用此功能吗?

解决方案

在这种情况下,听起来好像prerender请求被取消,因为您已经打开了开发工具。



如果您想查看有关请求被取消原因的更多信息,请将chrome:// net-internals /#prerender复制并粘贴到您的多功能框中如果您从白皮书粘贴的取消原因列表中列出了 ,则几乎所有情况下,预呈现都可以正常工作。


I'm trying the prerender feature in chrome, but when I check the network, I can see the request is beeing canceled for any link.

I'm using the following syntax:

<link rel="prerender" href="http://example.org/index.html">

I tried the live demo at http://prerender-test.appspot.com/ and got the same result. Why is that?

Update (from https://developers.google.com/chrome/whitepapers/prerender):

In some cases while prerendering a site Chrome may run into a situation that could potentially lead to user-visible behavior that is incorrect. In those cases, the prerender will be silently aborted. Some of these cases include:

  • Note: This is not an exhaustive list. Last updated 11/10/11.

    1. The URL initiates a download
    2. HTMLAudio or Video in the page
    3. POST, PUT, and DELETE XMLHTTPRequests
    4. HTTP Authentication
    5. HTTPS pages
    6. Pages that trigger the malware warning
    7. Popup/window creation
    8. Detection of high resource utilization
    9. Developer Tools is open
    10. Plugins such as Flash will have their initialization deferred until the user actually visits the prerendered page.

But the question is when can I use this feature?

解决方案

In this case it sounds like the prerender requests are being canceled because you have Developer Tools open.

If you want to see more information about the reason why the requests are being canceled, copy and paste chrome://net-internals/#prerender into your omnibox and hit enter.

Prerendering should work in almost all cases that aren't listed in the list of cancellation reasons that you pasted from the whitepaper.

这篇关于Chrome Prerender功能每次都会取消的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆