Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在寻找测量加载由 Mobify-js 生成的页面所需的时间。如网站所述,使用js时,优化了页面加载时间。所以,我想了解,我可以根据哪些基准(原始)文件来衡量 mobify-js 的性能。
我想到的一件事是,只需在源代码中删除诸如“resizeImages-img-element/index.html”之类的示例页面的mobify-js的导入,并比较使用和不使用mobify的页面加载时间-js。Mobify-js 社区,有同样的想法吗?在这方面的任何帮助将不胜感激。
您可以通过查看Mobify.timing.points. 使用它,您可以测量页面开始加载与不同事件集合之间的时间差。
Mobify.timing.points
// Measure time between 'finished document' and 'DOMContentLoaded' var loadTime = Mobify.timing.points[11][0] - Mobify.timing.points[0][0]