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
The code example for the contact form has
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.
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
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
Thank you. I was interested in the difference btwn the 2 as well, so these answers are very helpful.
This topic is now closed. New replies are no longer allowed.