I've added it to our snippet section. Feel free to also add these things
for your own, Oliver.
http://qooxdoo.oss.schlund.de/snippets/compress-qooxdoojs-without-moddeflateSebastian
Oliver Vogel schrieb:
> i know, this is not a qooxdoo and not a javascript solution. it is a php
> solution. but if someone has php at the server, she can write
> <script language=javascript src="<<path>>/qooxdoo.php">.
> then you can create a file called qooxdoo.php with this content:
>
> --- cut ---
> <?php
> /**
> * Diese Seite überprüft, ob der Browser komprimierte Dateien
> akzeptiert oder nicht.
> * Wenn ja, die komprimierte Datei senden, wenn nein, die nicht
> komprimierte Datei senden
> *
> * @author Oliver Vogel <
o.vogel@...>
> * @since 05.03.2006
> */
> $encodings = array();
> if (isset($_SERVER['HTTP_ACCEPT_ENCODING']))
> {
> // Get all available encodings
> $encodings = explode(',', strtolower(preg_replace("/\s+/", "",
> $_SERVER['HTTP_ACCEPT_ENCODING'])));
> // Check for gzip header
> if (in_array('gzip', $encodings))
> {
> // found: send the zip-ed file
> header("Content-Encoding: gzip");
> echo file_get_contents(getenv('DOCUMENT_ROOT') .
> '/yanis42/lib/qooxdoo/script/qooxdoo.js.gz');
> die;
> }
> }
>
> // Encoding not found or gzip not accepted -> send "normal" file
> echo file_get_contents(getenv('DOCUMENT_ROOT') .
> '/yanis42/lib/qooxdoo/script/qooxdoo.js');
> die;
> ?>
> --- cut ---
>
> this page checks if the browser supports gzip. if yes, the server sends
> the gzip file to the client.
>
> !!This solution needs no gzip - support at the server-side - only php!!
>
> I know, it is NOT JavaScript but maybe it is a good idea to add this to
> the qooxdoo distribution (and it may be a good idea if one with python
> or pearl or sowhat experience ports this script to another server-side
> programming language)
>
> Olli
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by xPML, a groundbreaking scripting language
> that extends applications into web and mobile media. Attend the live
> webcast
> and join the prime developer group breaking into this new coding territory!
>
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642> _______________________________________________
> Qooxdoo-devel mailing list
>
Qooxdoo-devel@...
>
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642_______________________________________________
Qooxdoo-devel mailing list
Qooxdoo-devel@...
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel