Home >Web Front-end >JS Tutorial >How to Retrieve the Latest jQuery Library from Google APIs?

How to Retrieve the Latest jQuery Library from Google APIs?

DDD
DDDOriginal
2024-10-21 22:40:03821browse

How to Retrieve the Latest jQuery Library from Google APIs?

Retrieving the Latest jQuery Library from Google APIs

The provided jQuery URL in the question is for version 1.2.6. For retrieving the latest version, there was previously an alternative to using a specific version number, which was to use the following syntax:

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

However, up until jQuery 1.11.1, there were several alternative URLs for obtaining 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)

After jQuery 1.11.1, both jQuery and Google discontinued updating these URLs, resulting in them being permanently fixed at version 1.11.1. Consequently, there is no longer a supported alternative URL for retrieving the latest jQuery version. For further clarification, please refer to this blog post: https://blog.jquery.com/2014/04/22/dont-use-jquery-latest-js/.

While these legacy URLs still remain in use, it is recommended to use a specific version number in your jQuery links for more predictable and dependable results.

The above is the detailed content of How to Retrieve the Latest 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