In order to improve the user experience, web applications often have a large amount of JavaScript. generally, some tools will be used to reduce the size of JS files before release, thus improving the download speed. every time you modify JS CodeIt is very troublesome to use a client or online tool for processing and then upload it to the web server. austinchau provides a library that automatically compresses JavaScript source files on the Gae server. in this way, the JS file can be uploaded directly after each modification, and you do not need to compress it with tools each time.
For example, suppose that your JS source file (uncompressed) is put under the/JS directory, the access address is: http://example.appspot.com/js/core.js, when the client accesses the http://example.appspot.com/Js_min/CORE. JS, the server automatically compresses the JS file and sends it to the client. js source file and the compressed version will be cached in memcache to improve efficiency.
This library is easy to use:
1. Download the two py files: javascript. py and jsmin. py, and upload them together with your code to your Google App Engine site;
2. Add the following two sentences to app. yaml (assuming that all your JavaScript source files are in the/JS directory ):
-URL:/JS .*
Script: javascript. py
3. Success!
Kuber @ feedzshare