What's the reason to include scripts with two different calls?

后端 未结 6 1984
小蘑菇
小蘑菇 2021-01-05 05:15

I use HTML5 boilerplate and jQuery is declared twice in the HTML page like this:



        
6条回答
  •  滥情空心
    2021-01-05 05:30

    Loading jQuery from the Google CDN can be much faster than loading it from your local server and it can be cached so the user might already have a cached copy of it from another website.

    The check is make sure that it got loaded, otherwise if it failed, load it from the local server.

提交回复
热议问题