Home  >  Article  >  Web Front-end  >  How Can I Get the Most Up-to-Date Version of the jQuery Library from Google APIs?

How Can I Get the Most Up-to-Date Version of the jQuery Library from Google APIs?

Linda Hamilton
Linda HamiltonOriginal
2024-10-21 22:49:02241browse

How Can I Get the Most Up-to-Date Version of the jQuery Library from Google APIs?

How to Obtain the Latest Version of jQuery Library from Google APIs

The original jQuery link format used in script tags:

http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.js

Currently, there is no direct link to the latest version of the jQuery library on Google APIs. However, until jQuery 1.11.1, the following URLs provided access to the latest version:

  • https://code.jquery.com/jquery-latest.min.js (jQuery hosted, minified)
  • https://code.jquery.com/jquery-latest.js (jQuery hosted, uncompressed)
  • https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js (Google hosted, minified)
  • https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js (Google hosted, uncompressed)

For example:

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

However, note that since jQuery 1.11.1, these URLs have been frozen at version 1.11.1 and will not be updated further. This decision was made for stability reasons, as detailed in this blog post: Don't use jquery-latest.js.

Both jQuery and Google support both HTTP and HTTPS protocols, so you can adjust the URL accordingly. Additionally, you can refer to the Google Developers guide for more information on using Google-hosted libraries.

The above is the detailed content of How Can I Get the Most Up-to-Date Version of the jQuery Library from Google APIs?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn