1. Many websites use this method, and the client's browser may have cached jquery. It can be called locally directly, and the speed is faster...
2. Google code uses the cdn technology to have node servers in many places. Loading jquery is definitely not slower than loading it on your server, except for local servers :)
3. It can save server traffic and reduce server bandwidth pressure
Google code's jquery can be referenced in two ways
I. Reference http://www.google.com/jsapi? Key = Goolge key
<Script type = "text/javascript">
Google. load ("jquery", "1.4.2 ");
</Script>
2. Direct reference address http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js
JQuery 1.2.6 references a file
Copy codeThe Code is as follows:
<Script src = "http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js" type = "text/javascript"> </script>
Google jQuery 1.3.2 reference file
Copy codeThe Code is as follows:
<Script src = "http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" type = "text/javascript"> </script>
Google jQuery 1.4.2 reference file
Copy codeThe Code is as follows:
<Script src = "http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type = "text/javascript"> </script>
Google jQuery 1.5.2 reference file
Copy codeThe Code is as follows:
<Script src = "http://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js" type = "text/javascript"> </script>