News Feed
Jobs Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Ed Eliot's Blog:
Automatic merging and versioning of CSS/JS files with PHP
December 18, 2006 @ 14:29:00

Including Javascript files into your application is simple, but for each, a HTTP call has to be made back to the server and its contents pulled down. Ed Eliot decided he wanted to compress things a bit more so he created this script to push them all into one file dynamically.

I hate maintaining this stuff manually so I've written a PHP script which takes care of merging files on the fly whilst also versioning the merged file automatically as the various component files change.

He gives an example of this simple script - defining which files to compress, defining the directory to pull them from, and using mod_rewrite to handle the Javascript file requests.

0 comments voice your opinion now!
automatic marge version javascript css script automatic marge version javascript css script


blog comments powered by Disqus

Similar Posts

Community News: phpDocumentor Merges with DocBlox for phpDocumentor 2!

Ryan Grove's Blog: Minify combines, minifies &caches JavaScript & CSS files to speed up page loads

DevShed: Using Self-Saving Objects with Command Objects in PHP 5

Jim Plush's Blog: How to Auto Create Issues in Jira From PHP

Jim Plush\'s Blog: AJAX, PHP and Javascript Errors - How to get more data


Community Events











Don't see your event here?
Let us know!


symfony2 composer component podcast hack application language package install opinion example unittest code facebook hhvm release security introduction overview framework

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework