Getting Jquery

What is the best way to insure you are ALWAYS getting the latest version of Jquery when you reference it externally?

For example, I have this in one of my files that use jquery:

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>

Seems odd (& dangerous) to reference a specific version #. Is there a way around this?

Thanks
Richard KortsAsked:
Who is Participating?
 
Rainer JeschorCommented:
Hi,
afaik there is no direct latest jQuery version. jQuery had this once but it has been discontinued with the new version branch of 2.x.

They argue, that this puts your web site at a high risk, as you can never ensure that an update would not break any functionality.
Therefore this link
<script type="text/javascript"
src="http://code.jquery.com/jquery-latest.min.js" charset="utf-8">
</script>

Open in new window

references still the "old" 1.11.1 version.

Please see also:
http://blog.jquery.com/2014/07/03/dont-use-jquery-latest-js/

HTH
Rainer
0
 
Rainer JeschorCommented:
Therefor to be sure, always reference a specific version - and watch the jQuery site regularly. If there is an update / new version, review the upgrade log on jquery.com and deploy it / test your site first on a test server (with all the necessary browser versions you want to support !!!).
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.