![]() Originally reported on Google Code with ID 78 Minify version: 2.1.1Ģ. The JSMin library used for JavaScript minification was originally written by Douglas Crockford and was ported to PHP by Ryan Grove specifically for use in Minify. Minify was inspired by jscsscomp by Maxim Martynyuk and by the article Supercharged JavaScript by Patrick Hunlock. By default Minify appends " charset=utf-8" to the Content-Type headers it sends. Minify should work fine with files encoded in UTF-8 or other 8-bit encodings like ISO 8859/Windows-1252.If you combine a lot of CSS, watch out for IE's 4096 selectors-per-file limit, affects IE 6 through 9.Minify is designed for efficiency, but, for very high traffic sites, it will probably serve files slower than your HTTPd due to the CGI overhead of PHP.Install dev deps via Composer: composer install. ![]() See the cookbook for more advanced options for minification. Minify also comes with a URI Builder application that can help you write URLs for use with Minify or configure groups of files. Version 3 allows serving files directly from the filesystem for much better performance. Relative URLs in CSS files are rewritten to compensate for being served from a different directory. It eliminated 5 HTTP requests and reduced JS/CSS bandwidth by 70%. The stats above are from a brief walkthrough which shows how easy it is to set up Minify on an existing site. It compresses and combines files and serves it with appropriate headers, allowing conditional GET or long-Expires. Minify is an HTTP server for JS and CSS assets.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |