Skip to content

Commit 25595b9

Browse files
authored
Download: enable h1, reduce decisions, remove old info
* Enable the h1 heading. The page content has no custom h1 of its own so looks out of place with other pages on jquery.com. * Invert the order of some paragraphs so that links are clear and at the top, with a single recommended option each time and then other links in a bullet list after it. E.g. there is now an actual "Download jQuery 3.7.1" button, describing over top that it is the compressed production version, and then a list of other links. Explanations of these files now follow the list instead of being in front of it, thus burying the links less. * Promote link to browse releases.jquery.com to the first section. I've personally never used the links that were in the first section previously as they always felt like too much text to read. When I land on the releases list, I know what each variant is and feel more confident that I'm getting the right one instead of reading the long link labels. If we like this direction and shorter links, taking into account that many people probably already "start" at releases.jquery.com based on links to there from other places and thus only see the short versions there, we could also explore shortening the labels here. I've not done that in this commit yet. * Remove outdated info about source maps still being a future/emerging technology. * Remove instructions for Bower. * Improve "Yarn" CLI link readability by giving it the full term as its link label, "Yarn CLI" instead of only partly linked. * Improve "npm" sentence by linking "npm" and then naming "jquery package" in the second link. * Update Pre-Release section to link to releases site instead of to a single file, since there are now quite a lot of variants of this file that people may want to choose between. * Update "jQuery CDN" section heading to link to the releases site from its name, and remove outdated sponsorship mention. * Improve "Other CDNs" by applying the bolding more focussedly (when an entire paragraph is bold, it's the same as bolding nothing, is my rule of thumb). Ensure the bolded portion is readable and understandable by itself. * Remove "Build from Git" section, covered by README where it is presumably more up to date. This is linked to from "About the code". * Remove mention of closed jQuery Forum from "About the code", instead link to "Report a bug", matching the link chosen at jquery/jquery-wp-content#220. * Remove mention of plugins.jquery.com from "About the code". Ref jquery/infrastructure-puppet#29.
1 parent dc824c0 commit 25595b9

File tree

1 file changed

+47
-88
lines changed

1 file changed

+47
-88
lines changed

pages/download.md

Lines changed: 47 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -1,106 +1,86 @@
11
<script>{
2-
"title": "Download jQuery",
3-
"customFields": [
4-
{ "key": "hide_title", "value": 1 }
5-
]
2+
"title": "Download jQuery"
63
}</script>
74

8-
## Downloading jQuery
9-
10-
Compressed and uncompressed copies of jQuery files are available. The uncompressed file is best used during development or debugging; the compressed file saves bandwidth and improves performance in production.
11-
You can also download a [sourcemap file](https://www.html5rocks.com/en/tutorials/developertools/sourcemaps/) for use when debugging with a compressed file.
12-
The map file is _not_ required for users to run jQuery, it just improves the developer's debugger experience.
13-
As of jQuery 1.11.0/2.1.0 the `//# sourceMappingURL` comment is [not included](https://blog.jquery.com/2014/01/24/jquery-1-11-and-2-1-released/) in the compressed file.
5+
## Latest version
146

157
To locally download these files, right-click the link and select "Save as..." from the menu.
168

17-
### jQuery
9+
Download the compressed, production version:
10+
11+
<a class="button db" href="https://code.jquery.com/jquery-3.7.1.min.js">Download jQuery 3.7.1</a>
12+
13+
* [Download the uncompressed development version of jQuery 3.7.1](https://code.jquery.com/jquery-3.7.1.js)
14+
* [Download the map file for jQuery 3.7.1](https://code.jquery.com/jquery-3.7.1.min.map)
15+
* [jQuery 3.7.1 blog post with release notes](https://blog.jquery.com/2023/08/28/jquery-3-7-1-released-reliable-table-row-dimensions/)
16+
17+
The slim build is a smaller version, that excludes the [ajax](https://api.jquery.com/category/ajax/) and [effects](https://api.jquery.com/category/effects/) modules:
18+
19+
* [Download jQuery 3.7.1 slim build](https://code.jquery.com/jquery-3.7.1.slim.min.js)
20+
* [Download the uncompressed development version of the jQuery 3.7.1 slim build](https://code.jquery.com/jquery-3.7.1.slim.js)
21+
* [Download the map for the jQuery 3.7.1 slim build](https://code.jquery.com/jquery-3.7.1.slim.min.map)
1822

19-
For help when upgrading jQuery, please see the [upgrade guide](/upgrade-guide/) most relevant to your version.
20-
We also recommend using the [jQuery Migrate plugin](https://github.com/jquery/jquery-migrate).
23+
The uncompressed version is best used during development or debugging; the compressed file saves bandwidth and improves performance in production. You can download the [source map](https://www.html5rocks.com/en/tutorials/developertools/sourcemaps/) file to help with debugging the compressed production version. The source map is _not_ required for end-users to run jQuery; it is a tool to help improve a developer's debugging experience. As of jQuery 1.11/2.1, we [no longer link source maps](https://blog.jquery.com/2014/01/24/jquery-1-11-and-2-1-released/) to compressed releases by default.
2124

22-
<a href="https://code.jquery.com/jquery-3.7.1.min.js" download>Download the compressed, production jQuery 3.7.1</a>
25+
Browse the jQuery CDN at **[releases.jquery.com](https://releases.jquery.com)** for a full list of assets, including older and historical versions.
2326

24-
<a href="https://code.jquery.com/jquery-3.7.1.js" download>Download the uncompressed, development jQuery 3.7.1</a>
27+
### Upgrade
2528

26-
<a href="https://code.jquery.com/jquery-3.7.1.min.map" download>Download the map file for jQuery 3.7.1</a>
29+
For help when upgrading jQuery, read the [upgrade guide](/upgrade-guide/).
30+
We also recommend using the [jQuery Migrate plugin](https://github.com/jquery/jquery-migrate)
2731

28-
You can also use the slim build, which excludes the [ajax](https://api.jquery.com/category/ajax/) and [effects](https://api.jquery.com/category/effects/) modules:
32+
### jQuery Migrate Plugin
2933

30-
<a href="https://code.jquery.com/jquery-3.7.1.slim.min.js" download>Download the compressed, production jQuery 3.7.1 slim build</a>
34+
The [jQuery Migrate plugin](https://github.com/jquery/jquery-migrate/#readme) simplifies upgrading from older versions of jQuery. The plugin restores deprecated features and behaviors so that older code will still run properly on newer versions of jQuery.
3135

32-
<a href="https://code.jquery.com/jquery-3.7.1.slim.js" download>Download the uncompressed, development jQuery 3.7.1 slim build</a>
36+
When upgrading from a pre-1.9 jQuery version to jQuery 1.9 or upto jQuery 3.0, first use jQuery Migrate 1.x:
3337

34-
<a href="https://code.jquery.com/jquery-3.7.1.slim.min.map" download>Download the map file for the jQuery 3.7.1 slim build</a>
38+
* <a href="https://code.jquery.com/jquery-migrate-1.4.1.min.js">Download jQuery Migrate 1.4.1</a> (compressed production version)
39+
* <a href="https://code.jquery.com/jquery-migrate-1.4.1.js">Download the uncompressed, development jQuery Migrate 1.4.1</a>
3540

36-
[jQuery 3.7.1 blog post with release notes](https://blog.jquery.com/2023/08/28/jquery-3-7-1-released-reliable-table-row-dimensions/)
41+
When migrating from jQuery 3.x to a later jQuery 3.x version, use jQuery Migrate 3.x instead:
42+
43+
* <a href="https://code.jquery.com/jquery-migrate-3.4.0.min.js">Download jQuery Migrate 3.4.0</a> (compressed production version)
44+
* <a href="https://code.jquery.com/jquery-migrate-3.4.0.js">Download the uncompressed, development jQuery Migrate 3.4.0</a>
45+
46+
Use the _compressed production_ version to simply restore compatibility issues without changing any application code.
47+
48+
Use the _uncompressed development_ version to additionally diagnose and help migrate compatibility issues, through helpful warnings on the console that identify how to transition your application code.
3749

3850
## Downloading jQuery using npm or Yarn
39-
jQuery is registered as [a package](https://www.npmjs.com/package/jquery) on [npm](https://www.npmjs.com/). You can install the latest version of jQuery with the npm CLI command:
51+
jQuery is published on [npm](https://www.npmjs.com/) under the [jquery package](https://www.npmjs.com/package/jquery). You can install the latest version of jQuery with the npm CLI:
4052
```
4153
npm install jquery
4254
```
43-
As an alternative you can use the [Yarn](https://github.com/yarnpkg/yarn) CLI command:
55+
As an alternative you can use the [Yarn CLI](https://github.com/yarnpkg/yarn):
4456
```
4557
yarn add jquery
4658
```
4759
This will install jQuery in the `node_modules` directory. Within `node_modules/jquery/dist/` you will find an uncompressed release, a compressed release, and a map file.
4860

49-
## Downloading jQuery using Bower
50-
jQuery is also registered as a package with [Bower](https://bower.io). You can install the latest version of jQuery with the command:
51-
```
52-
bower install jquery
53-
```
54-
This will install jQuery to Bower's install directory, the default being `bower_components`. Within `bower_components/jquery/dist/` you will find an uncompressed release, a compressed release, and a map file.
55-
56-
The jQuery Bower package contains additional files besides the default distribution. In most cases you can ignore these files, however if you wish to download the default release on its own you can use Bower to install jQuery from one of the above urls instead of the registered package. For example, if you wish to install just the compressed jQuery file, you can install just that file with the following command:
57-
```
58-
bower install https://code.jquery.com/jquery-3.7.1.min.js
59-
```
60-
61-
## jQuery Migrate Plugin
62-
63-
We have created the [jQuery Migrate plugin](https://github.com/jquery/jquery-migrate/#readme)
64-
to simplify the transition from older versions of jQuery. The plugin restores deprecated features and behaviors so that older code will still run properly on newer versions of jQuery. Use the _uncompressed development_ version to diagnose compatibility issues, it will generate warnings on the console that you can use to identify and fix problems. Use the _compressed production_ version to simply fix compatibility issues without generating console warnings.
65-
66-
There are two versions of Migrate. The first will help you update your pre-1.9 jQuery code to jQuery 1.9 up to 3.0. You can get that version here:
67-
68-
<a href="https://code.jquery.com/jquery-migrate-1.4.1.min.js" download>Download the compressed, production jQuery Migrate 1.4.1</a>
69-
70-
<a href="https://code.jquery.com/jquery-migrate-1.4.1.js" download>Download the uncompressed, development jQuery Migrate 1.4.1</a>
71-
72-
The second version helps you update code to run on jQuery 3.0 or higher, *once you have used Migrate 1.x and upgraded to jQuery 1.9 or higher*:
73-
74-
<a href="https://code.jquery.com/jquery-migrate-3.4.0.min.js" download>Download the compressed, production jQuery Migrate 3.4.0</a>
75-
76-
<a href="https://code.jquery.com/jquery-migrate-3.4.0.js" download>Download the uncompressed, development jQuery Migrate 3.4.0</a>
77-
7861
## jQuery Pre-Release Builds
7962

80-
The jQuery team is constantly working to improve the code. Each commit to the Github repo generates a work-in-progress version of the code that we update on the jQuery CDN. _These versions are sometimes unstable and never suitable for production sites._ We recommend they be used to determine whether a bug has already been fixed when reporting bugs against released versions, or to see if new bugs have been introduced.
81-
82-
<a href="https://releases.jquery.com/git/jquery-git.js" download>Download the work-in-progress jQuery build</a>
63+
The jQuery team is constantly working to improve the code. Each commit to the Github repo generates a work-in-progress version of the code that we update on the jQuery CDN. We recommend they be used to determine whether a bug has already been fixed when reporting bugs against released versions, or to see if new bugs have been introduced.
8364

84-
## Using jQuery with a CDN
65+
_These versions are sometimes unstable and never suitable for production sites._
8566

86-
[CDNs](https://en.wikipedia.org/wiki/Content_delivery_network) can offer a performance benefit by hosting jQuery on servers spread across the globe. This also offers an advantage that
87-
if the visitor to your webpage has already downloaded a copy of jQuery from the same CDN, it won't have to be re-downloaded.
67+
<a href="https://releases.jquery.com/jquery/">Browse Git builds of jQuery</a>
8868

89-
### jQuery's CDN provided by [StackPath](https://www.stackpath.com)
69+
## [jQuery CDN](https://releases.jquery.com)
9070

91-
The jQuery CDN supports [Subresource Integrity](https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity) (SRI) which allows the browser to verify that the files being delivered have not been modified. This [specification](https://www.w3.org/TR/SRI/) is currently being implemented by browsers. Adding the new integrity attribute will ensure your application gains this security improvement as browsers support it.
71+
To use the jQuery CDN, reference the file in the script tag directly from the jQuery CDN domain. You can get the complete script tag, including Subresource Integrity attribute, by visiting https://releases.jquery.com and clicking on the version of the file that you want to use. Copy and paste that tag into your HTML file.
9272

93-
To use the jQuery CDN, just reference the file in the script tag directly from the jQuery CDN domain. You can get the complete script tag, including Subresource Integrity attribute, by visiting https://releases.jquery.com and clicking on the version of the file that you want to use. Copy and paste that tag into your HTML file.
73+
The jQuery CDN supports [Subresource Integrity](https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity) (SRI) ([specification](https://www.w3.org/TR/SRI/)) which allows the browser to verify that the files being delivered have not been modified. Adding the new integrity attribute will ensure your application gains this security improvement in supporting browsers.
9474

9575
Starting with jQuery 1.9, [sourcemap files](https://blog.jquery.com/2013/01/09/jquery-1-9-rc1-and-migrate-rc1-released/#sourcemaps) are available on the jQuery CDN. However, as of version 1.10.0/2.1.0 the compressed jQuery no longer includes the sourcemap comment in CDN copies because it requires the uncompressed file and sourcemap file to be placed at the same location as the compressed file. If you are maintaining local copies and can control the locations all three files, you can add the sourcemap comment to the compressed file for easier debugging.
9676

97-
To see all available files and versions, visit [https://releases.jquery.com](https://releases.jquery.com)
77+
To see all available files and versions, including older and historical versions, visit [https://releases.jquery.com](https://releases.jquery.com)
9878

9979
### Other CDNs
10080

10181
The following CDNs also host compressed and uncompressed versions of jQuery releases. Starting with jQuery 1.9 they may also host [sourcemap files](https://blog.jquery.com/2013/01/09/jquery-1-9-rc1-and-migrate-rc1-released/#sourcemaps); check the site's documentation.
10282

103-
**Note that there may be delays between a jQuery release and its availability there. Please be patient, they receive the files at the same time the blog post is made public. Beta and release candidates are not hosted by these CDNs.**
83+
Note that **there may be delays between a jQuery release and its availability there**. Please be patient, they receive the files at the same time the blog post is made public. Beta and release candidates are not hosted by these CDNs.
10484

10585
* [Google CDN](https://developers.google.com/speed/libraries#jquery)
10686
* [Microsoft CDN](https://learn.microsoft.com/en-us/aspnet/ajax/cdn/overview#jQuery_Releases_on_the_CDN_0)
@@ -109,34 +89,13 @@ The following CDNs also host compressed and uncompressed versions of jQuery rele
10989

11090
## About the Code
11191

112-
**jQuery is provided under the <a href="https://jquery.org/license/">MIT license</a>.**
113-
114-
The code is hosted and developed in the [jQuery GitHub repository](https://github.com/jquery/jquery). If you've spotted some areas of code that could be improved, please feel free to discuss it on the [Developing jQuery Core Forum](https://forum.jquery.com/developing-jquery-core). If you'd like to participate in developing jQuery, peruse our [contributor site](https://contribute.jquery.org) for more information.
115-
116-
To find and download plugins developed by jQuery contributors, please visit the <a href="https://plugins.jquery.com/">Plugins site</a>. Plugin authors are responsible for maintenance of their plugins. Feedback on plugins should be directed to the plugin author, not the jQuery team.
92+
**jQuery is provided under the <a href="https://jquery.com/license/">MIT license</a>.**
11793

118-
### Build from Git
119-
120-
*Note:* To just use the latest work-in-progress version of jQuery, please try the jQuery Pre-Release Build described above.
121-
122-
All source code is kept under Git revision control, which you can browse online. The repository's <a href="https://github.com/jquery/jquery/blob/master/README.md">README</a> has more information on building and testing your own jQuery, as well as instructions on creating a custom build that excludes some APIs to reduce file size.
123-
124-
If you have access to Git, you can connect to the repository here:
125-
126-
``` bash
127-
git clone git://github.com/jquery/jquery.git
128-
```
129-
130-
You can also check out and build a specific version of jQuery from GitHub:
131-
132-
``` bash
133-
git clone git://github.com/jquery/jquery.git
134-
git checkout 1.2.6
135-
```
94+
The code is hosted and developed in the [jQuery GitHub repository](https://github.com/jquery/jquery). If you've spotted some areas of code that could be improved, feel free to [report a bug](https://contribute.jquery.org/bug-reports/). If you'd like to participate in developing jQuery, peruse our [contributor site](https://contribute.jquery.org) for more information.
13695

137-
The README file for a specific version will have instructions for building that version, as the process has changed over time.
96+
Feedback about a jQuery plugin should be directed to the plugin author, not the jQuery team.
13897

139-
***
98+
-----
14099

141100
## Past Releases
142101

0 commit comments

Comments
 (0)