.js和.min.js有什么区别? [英] What is the difference between .js and .min.js?

查看:127
本文介绍了.js和.min.js有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为我的项目使用javascript图形库.在所有库中,我都找到类似

I am using javascript graphic libraries for my project. In all libraries I am finding the files like

abc.js - abc.min.js
xyz.js - xyz.min.js

.min 表示什么?这是制作javascript库的某种语法吗?

What does .min indicate? Is it some sort of syntax of making javascript libraries?

推荐答案

.min是压缩版本,主要在启动网站时使用,以减轻特定网站的负担.

.min is the minified version, and it is primarily used while the website is being launched in order to reduce the load for the particular website.

在压缩过程中,基本上所有的长变量名和函数名都将转换为较短的变量名和函数名.结果,它将减小该特定文件的大小,从而降低网站的加载速度.

Basically all the long variable names and function names are converted into shorter ones during the process of minifying. As consequence it would reduce the size of that particular file, so it would less the loading speed of the website.

另一方面,普通.js是在站点启动之前使用的,即站点处于开发/测试模式时.

On the other hand normal .js is the one which is used until the site being launched, meaning while the site in the mode of development/testing.

这篇关于.js和.min.js有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆