What are advantages of using google.load('jQuery', …) vs direct inclusion of hosted script URL?

前端 未结 7 2131
甜味超标
甜味超标 2020-12-04 17:07

Google hosts some popular JavaScript libraries at: http://code.google.com/apis/ajaxlibs/

According to google:

The most powerful way to load th

相关标签:
7条回答
  • 2020-12-04 17:29

    You might want to load a library only under special conditions.

    Additionally the google.load method would speed up the initial page display. Otherwise the page rendering will freeze until the file has been loaded if you include script tags in your html code.

    0 讨论(0)
提交回复
热议问题