On Sep 20, 5:23 pm, "Brook Davies" <[EMAIL PROTECTED]> wrote:
> How do you keep your source files organized and the process of combining and
> packing them to release any changes or bug fixes orderly?

What i do is use a PHP file as an intermediary so that i can use gzip
compression on them:

js.php:

<?php
ob_start('ob_gzhandler');
echo file_get_contents( "file1.js");
echo file_get_contents( "file2.js");
... repeat for each file ...
ob_end_flush();
?>

In my HTML files i then include /path/to/js.php via a <script> tag.
The end result is a single HTML request with all JS files, and it is
compressed with gzip if (and only if) the client browser can handle
the compression.

There are several more fancy variations of this archived in this list
somewhere (go back a month or two). Be aware that some people prefer a
variant of the above which caches the output on the web server. As a
general rule it is poor practice to write out files on the web server.
There are several reasons for this, but the most glaring is that the
files will be owned by the web server user, which is probably not the
same as your account on the hosting service. When this happens, you
may not be able to modify or delete the files using your account.
(This happens, e.g., when writing out files on the SourceForge-hosted
web servers.)


Reply via email to