I'm curious to know why HTML5 Boilerplate includes HTML5 Shiv two times. I understand the first entry, but am confused as to what the second one checks for/does. I was also wondering, how come one is hosted by google and the other one is located on local server. What is the meaning of "vendor" folder (as far as I know it stands for something like salesman)?

<!--[if lt IE 9]>
   <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
   <script>window.html5 || document.write('<script src="js/vendor/html5shiv.js"><\/script>')</script>
<![endif]-->
有帮助吗?

解决方案

It first tries to get the shiv from the google CDN, if this fails for any reason then window.html5 will be undefined and then it will serve the file from your host.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top