When middleware actually sits in the middle and is not attached like a parasite to its host, it's makes for some very convenient software. After a few misguided attempts, we believe to have come up with two good middlewares.
First there's ``repoze.bitblt``. It transforms images on the fly! Give it a width and a height, and it'll resize your image. Use it in conjunction with a caching proxy for optimum performance. Ideas for future enhancements include mimetype conversion and image scale presets.
Then we have ``repoze.squeeze``. It literally squeezes your stylesheets and javascripts, all with zero configuration! How can it work?! It keeps a record of which resources appear together and keeps an internal cache of the resources as they are served; when it has enough information to determine which resources should be bundled (merged), it intercepts HTML documents and rewrites the resource links. Expiration dates and vary-headers are observed, too!
2008-10-04
Subscribe to:
Post Comments (Atom)
2 comments:
CDN support might be a nice addition to squeeze
I suppose you could have some hook to upload the bundles to a CDN instead of to a local directory (or using a network mount point).
Post a Comment