在哪里可以找到 jQuery UI 示例,这些示例可以最大限度地减少加载时间并通过底部的脚本实现 YSlow?
我发现的大多数 jQuery 和 jQuery UI 示例都将脚本放在标题中,但根据 YSlow 性能规则,最好将脚本放在底部。这样,UI 就会尽快渲染,而 javaScript 稍后会被拾取以进行操作。不幸的是,似乎有几个 jQuery UI 组件需要它们的 javaScript 才能正确呈现。
是否有任何好的示例站点展示了使用 jQuery 和 jQuery UI 最大化加载性能的最佳实践?
Most of the jQuery and jQuery UI examples that I find have the scripts in the header but according to the YSlow performance rules it is best to put scripts at the bottom. That way the UI gets renders ASAP with the javaScript getting picked up later for operations. Unfortunately, it seems that several jQuery UI components require their javaScript to render properly.
Are there any good example sites that show best practices to maximize load performance with jQuery and jQuery UI?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是的。 Html5Boilerplate 是您需要访问任何并且<强>所有最佳实践。 Paul Irish 和 H5BP 团队整理了过去 3 年左右的所有最佳实践。那里有视频、文档和代码,所以一定检查一下。
在办公室,我尽可能多地采纳了他们的最佳实践。当我不在办公室时,对于个人/副业工作,我使用他们的模板。
正如 Paul 在他的视频中所展示的那样,YSlow 在使用其最佳实践时将 SKYROCKET 评为顶级。
Yes. Html5Boilerplate is THE site you need to go to for ANY and ALL best practices. Paul Irish and the H5BP team have compiled all the best practices over the past 3 years or so. There is video, documentation, and code over there, so DO check it out.
At the office, I've incorporated as many of their best practices as I possibly can. When I'm not at the office, for personal / side jobs, I use their template.
Just as Paul shows in his video, the YSlow grades SKYROCKET to the top when using their best practices.