0

i`m using the jquery library in ma web....so i`m wondering which method of calling the library is more recomended.
i mean to download the libary and call it directly from the server or to link to googleapis????
Any suggestions will be appreciated.

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


OR
<script src="/js/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript">
</head>

2
Contributors
4
Replies
5
Views
7 Years
Discussion Span
Last Post by mrcniceguy
0

MrNG,

Without doubt - method 2.

Otherwise you are reliant on someone else's server being up-and-running and still serving exactly the same version of jQuery on which you did all your rigorous testing when you built your app.

Whereas Google are probalby as reliable as an organisation can get, why take a risk, even a small one? Always keep as much as possible under your control.

I might sometimes use your method 1 for quick ad hoc testing of an idea but never for serious development work.

Airshow

Edited by Airshow: n/a

0

Thankx man...i`m going to use ur idea.
better to download the library.
So if their a new verions of jquery how i`m supposed to deal wit `em,or the version i used during development will be just enough.

1

MrcNG,

Always use the version you developed and tested with.

Only use a new version if it fixes bugs or has new feature that you want to use. Always test new functionality and re-test old functionality in your application before deploying a new lib version, otherwise something might break.

Airshow

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.