TRYNT Javascript Compression Web Service

The TRYNT Javascript Compression Web Service provides free JavaScript compression and obfuscation. Compressing JavaScript can improve the loading speed of your AJAX and JavaScript application as well as reduce your overall bandwidth usage. Obfuscating JavaScript serves to protect your code by making it harder to reverse engineer.

While the packing algorithm is forgiving of all forms of JavaScript, you must correctly terminate all JavaScript statements with semi-colons. This includes function declarations. If you neglect to do so your resulting compressed JavaScript may fail.

Please note that while we provide this service TRYNT did not develop the JavaScript compression engine. The original engine was developed by Dean Edwards and later re-written by Dev Pro.

New! Since compressing/obfuscating JavaScript can take a few seconds we've included a caching mechanism to store the resulting compressed javascript. You can however force a cache refresh through arguments.

If you use this free TRYNT API/Web Service you must provide proper attribution to comply with our terms of service.

Request URL

http://www.trynt.com/javascript-compression-api/v1/

Note that due to the js value being a potentially lengthy string, compression requests should be submitted using the POST protocol rather than the GET protocol.

Request parameters


Parameter Value Description
u string (optional) The url of your JavaScript file
js string (optional) The body of your JavaScript
f integer (optional) Should we force a cache flush

* While both arguments are optional, the JavaScript Compression API will not function without out at least one argument being passed. If you would like to test the API but don't have a JavaScript handy why not test it using XHConn, a popular Simple XMLHTTP Interface Library.


Sample Request (URL: http://www.trynt.com/javascript-compression-api/v1/):