如何测试预取/预渲染 [英] how to test prefetch/prerender

查看:138
本文介绍了如何测试预取/预渲染的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经开始使用prefetch / prerender系统加载一些关键资源和页面。

I have started to load a few key resources and pages using the prefetch/prerender system.

有没有办法确保有问题的资源实际上是预装?

Is there a way to ensure that the resources in question are actually being preloaded?

推荐答案

Google建议使用页面可见性API 用于测试页面是否正在预呈现。我不确定跨浏览器的效果如何(但在HTML5中有什么用)。

Google recommends using the Page Visibility API to test if a page is being prerendered. I'm not sure how well it works cross-browser (but what does in HTML5).

这篇关于如何测试预取/预渲染的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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