Basic jquery script question

I am adding a Git-based contact form w captcha on my bootstrap3 site; I’m not that averse on adding scripts and plugins yet.

Before the closing body tag I currently have

<script src="https://code.jquery.com/jquery.js"></script>

The code example for the contact form has

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>

Is this more or less the same jquery.js asset just with a different address, so I should replace mine? Or is the latter specific to my form, and I should keep both? Many thanks.

I am thinking this references the ajax library for the captcha, and that I should keep both scripts.?.

Don’t keep both scripts.
You should only include jQuery once per page.

AFAIK the first will get the latest stable release version (which may or may not be what other code needs), and the second gets a specific version.

If someting breaks because of incompatibility you can either include the version it needs or figure out what differences caused the problem(s) and modify the code.

But as Pullo mentioned, you should not use more than one version per page.

Exactly.

This:

<script src="https://code.jquery.com/jquery.js"></script>

will pull the latest, non-minified version of the 1.x branch of jQuery from jQuery’s own cdn.
This is currently v1.11.0

Whereas this:

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>

will pull in a minified version of jQuery v1.10.2 from Google’s cdn.

Notice the missing http:// at the begining of the url.
This will cause things to break if you test locally, but has advantages when used on a server (namely the browser will use the page’s protocol to try to obtain the file. On non-secure pages, http. On secure pages, https).

In your case I would use a specific, minified version.
Here is an interesting link on why it is best to include jQuery from Google’s cdn: http://stackoverflow.com/questions/2180391/why-should-i-use-googles-cdn-for-jquery

HTH

Thank you. I was interested in the difference btwn the 2 as well, so these answers are very helpful.