Tumblelog by Soup.io
Newer posts are loading.
You are at the newest post.
Click here to check if anything new just came in.

August 24 2010

Ajaxian » Want to pack JS and CSS really well? Convert it to a PNG and unpack it via Canvas

If you want to compress JavaScript and CSS you could reverse engineer a packing algorithm in JavaScript or you could use a lossless packing system that is already in use and supported in browsers. In this case the packed format is PNG and the way to unpack it is by using the canvas API's getImageData() method.
Reposted byluismboantifuchs