微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

On-Demand Javascript

程序名称:On-Demand Javascript

授权协议: 未知

操作系统: 未知

开发语言:

On-Demand Javascript 介绍

On-Demand Javascript Plugin aka “Lazy Loading”

Download Javascript as and when required, instead of downloading it all on
page load. This is a “lazy loading” approach applied to Javascript, and has
several benefits…

  • Initial page load is faster.
  • Overall bandwidth usage is less, since only Javascript that’s required is used.
  • Deployment is easier as the code takes care of pulling in Javascript, with the coder only ensuring enough is there to kick the process off.
  • You can produce snippets of Javascript on the fly - effectively sending back a kind of “behavIoUr message” advising the browser on its next action. This is a variant of the core pattern described at the end of this section.
  • You can bypass the standard “same-domain” policy that normally necessitates a Cross-Domain Proxy. Provided a server exposes a segment of valid Javascript, it can be extracted by the browser.

AjaxPatterns - On-Demand Javascript

On-Demand Javascript 官网

http://plugins.jquery.com/project/ondemandjs

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。

相关推荐