dojo - ContentPanes - compression

To compress the content delivered to a dojo ContentPane, you can compress the content and cache it with the Zlib functions of PHP, then open it with the filesystem functions and deliver it with the Content-Type header set to “text/html” (or other appropriate setting), and Content-Encoding set to “gzip“.

The compress and cache should be performed if the file is likely to be reused. If reuse is unlikely, or the file is relatively small, use gzencode or gzdeflate.

This should work with other libraries as well.