JavaScript online compression and formatting collection _javascript tips

Source: Internet
Author: User

Previously found in the compressed Javascript code of the program, has been used, feeling good.
http://javascriptcompressor.com/
Online compression Javascript source code
Just clean out the blanks, newline, extra annotations, and so on, especially when Shrink variables is selected, the long variable name is reduced to the variable name of a single letter, and the compression ratio usually reaches 50% or less. Now AJAX is a big line, JavaScript files are bigger and larger, with this compression should be able to alleviate a lot of traffic burden. And after reducing the variable name, the program is not encrypted, but it will make the program become difficult to understand, to some extent, can protect the copyright bar.

Today I found the program to format the code.
http://elfz.laacz.lv/beautify/
You can reformat the compressed JS code into easy to read. Of course, if it is javascriptcompressor.com compression reduction variable name, it is not able to restore the original meaning of the variable name.
When you encounter a particularly large JS file, the browser will report time-consuming, election does not stop, eventually it can complete execution.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.