So the title says it. Is it bad practice to use <script src="http://code.jquery.com/jquery-latest.min.js" type="text/javascript"></script>
when I want to include Jquery in my page?
I asked this question because nowhere in the Jquery, Google, and Microsoft websites they provide such a link. Rather they put versioned links like this <script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
. That's why I thought maybe they do not want people to use that link.
And if it is bad practice, why is that? and what is the solution to keep up with these version changes?
Using a "latest" jQuery in a production environment wouldn't be very smart, as your web site would stop working if breaking changes occur. You always want to know which jQuery version you are writing your web site's code against.
Updating to a new jQuery version should always be a manual process for that reason. It would ideally look something like this:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With