本文介绍了如何测试预取/预渲染的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已经开始使用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建议使用用于测试页面是否正在预呈现。我不确定跨浏览器的效果如何(但在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).
这篇关于如何测试预取/预渲染的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!