所描述的rel ="prerender".在Chrome中 [英] Depricated rel="prerender" in Chrome

查看:207
本文介绍了所描述的rel ="prerender".在Chrome中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用资源提示"prerender"( W3C )来加快了网站的速度,但自v58起,Chrome中不使用prerender.我读到应该改为使用NoState-Prefetch( Google Dev ),但我找不到任何使用方法.

I want to use the resource hint "prerender" (W3C) to speed up a website, but prerender is depricated in Chrome since v58. I read that NoState-Prefetch should be used instead (Google Dev), but I don't find anything on how to use it.

有人知道我如何使用当前版本的Chrome呈现网站或如何使用"NoState-Prefetch"吗?

Does anybody know how I can prerender a site with the current version of Chrome or how to use "NoState-Prefetch"?

我很感谢每一个建议.预先非常感谢.

I'm grateful for every suggestion. Many thanks in advance.

推荐答案

不推荐使用Prerender,实际上它是

Prerender is not deprecated, in fact it's part of the w3 standards. Though the standards are clear in that the user agent SHOULD fetch, however later it describes that it May preprocess, and adds a point later that the user agent might decide not to do anything.

Chrome启动了prerender资源提示,以前意味着整个页面都应该在隐藏的渲染器进程中进行预渲染,但是目前chrome进行的NoState-Prefetch的功能不如完整渲染,但仍应节省时间-如果浏览器确实做到了.

Chrome initiated the prerender resource hint, previously it meant that the whole page should be pre-rendered in a hidden renderer process, but currently chrome does NoState-Prefetch which is less powerful than a full render but should still save time - in case the browser actually do it.

您可以查看以下文档深入了解为何chrome更改了prerender的实现,以及无状态预取何时/确切地执行什么操作.

You can take a look at the following document to dig deeper, into why chrome changed the implementation of prerender, and when/what does No-State Prefetch do exactly.

  • 转到chrome://net-export/(这将导出所有chrome窗口,应用和扩展程序中发生的所有网络活动的日志)
  • 转到您要检查预渲染的网站,给它一些时间以进行预渲染
  • 从网络导出页面保存json文件,并将其加载到 https://netlog-viewer. appspot.com/
  • 加载后,检查左侧菜单中的Prerender页面
  • go to chrome://net-export/ ( this will export a log of all the network activities happening from all chrome windows, apps, and extensions)
  • go to the website where you want to check prerendering, give it some time to idle and do the prerendering
  • save the json file from the net export page, and load it into https://netlog-viewer.appspot.com/
  • After its loaded, check the Prerender page found in the menu in the left side

这篇关于所描述的rel ="prerender".在Chrome中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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