javascript – 从谷歌获取Jquery

前端之家收集整理的这篇文章主要介绍了javascript – 从谷歌获取Jquery前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
有一些教程建议使用来自谷歌的 jquery路径,例如:

<script type="text/javascript" 
 src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>

在我们的项目中使用是否安全?

我们不依赖,因为我们不确定它会在一年或更长时间后存在吗?

我问过这个问题的原因是有些人赞成
那个.

解决方法

documentation

Google works directly with the key
stake holders for each library effort
and accepts the latest stable versions
as they are released. Once we host a
release of a given library,we are
committed to hosting that release
indefinitely.

这对我来说似乎风险很小.而且更有可能已经在用户的缓存中.并提供适当的gzip和缓存标头.也不会在只允许一次向域下载2个请求(例如IE6和IE7)的浏览器上占用域名的http请求.

猜你在找的jQuery相关文章