Open-source project: Page Releaser

Source: Internet
Author: User

Development using the JS framework + Ajax mode will always cause a large number of JS files to reduce the website transmission efficiency, especially in poor network conditions, it is easy to make the entire webpage unavailable, just like the classic error of IE, the object does not support this attribute or method.

There are many JS compression and merge tools, and I have done jsmin # Based on jsmin #. However, due to debugging needs, you still need to maintain an HTML for debugging, which references all uncompressed JavaScript files, and maintain HTML for publishing to reference the merged JS files. It is inconvenient to update the webpage every time.

Since then, I began to develop a better method, so I had the idea of page Releaser.

Page Releaser draws on the concept of release in C ++, parses HTML to extract JS and CSS information, compresses, merges, and embeds them, and re-constructs HTML based on the processing results, finally, a complete set of Release versions are generated. Page is called because it processes only one HTML at a time. (This was originally intended to be called webreleaser, but multiple HTML files will involve the sharing of resource webpages, which is complicated and difficult to evaluate the automated results. Fortunately, for a large framework like extjs, any application of HTML is enough :)

The ultimate goal of page Releaser is to compress websites that contain HTML, n js, n css, and n images into one HTML and one image, to minimize the efficiency waste caused by the establishment of connections in the browser.

Of course, setting up the least number of connections in a browser does not mean that the website has the optimal effect. For example, a 1000*1 image and a 1*1000 image are merged no matter how they are combined, generating new images will be much larger than the original ones, so page Releaser also provides various parameters to produce the best targeted results.

Currently, the released version only implements JavaScript compression, merging, embedding, and CSS merging and embedding. Other functions will be added gradually.

Page Releaser Installation

Of course, by convention, all gadgets are open-source, and you can also download them on your own.CodeCompile:

Page Releaser source code

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.