Home > Web Front-end > JS Tutorial > What is the difference between the compressed version and the uncompressed version of jquery

What is the difference between the compressed version and the uncompressed version of jquery

coldplay.xixi
Release: 2023-01-04 09:37:44
Original
4155 people have browsed it

The difference between the compressed version and the uncompressed version of jquery: 1. The file of the uncompressed version is 274KB, while the file of the compressed version is 87KB; 2. The comments and code of the uncompressed version are very clear, while the compressed version The version omits comments, removes all spaces and newlines, and organizes all code into one line.

What is the difference between the compressed version and the uncompressed version of jquery

The operating environment of this tutorial: windows7 system, jquery3.2.1 version, Dell G3 computer.

Recommended: jquery video tutorial

The difference between the compressed version and the uncompressed version of jquery:

First we click to enter jQuery Official website, download the uncompressed version and compressed version of version 3.4.1 respectively, as shown in the figure below

What is the difference between the compressed version and the uncompressed version of jquery

The interface after downloading is as shown in the figure below

What is the difference between the compressed version and the uncompressed version of jquery

The one with min is the compressed version. We can intuitively see that the uncompressed version of the file is 274KB, while the compressed version is 87KB.

Then we open the two files separately, first look at the screenshots of the uncompressed version

What is the difference between the compressed version and the uncompressed version of jquery

Then look at the screenshots of the compressed version

What is the difference between the compressed version and the uncompressed version of jquery

Through comparison, we can intuitively see that the comments and code of the uncompressed version are very clear at a glance.

The compressed version omits comments, then deletes all spaces and newlines, and organizes all the code into one line. Also replace some long variable names with simple a b c d.

Other than these, there is no difference between the two when we use them, that is to say, the two can be replaced with each other.

However, when we usually use it, we generally use the uncompressed version, because we can easily see the source code of jQuery, and when it goes online, it will be replaced with the compressed version.

Related free learning recommendations: javascript video tutorial

The above is the detailed content of What is the difference between the compressed version and the uncompressed version of jquery. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template