Question

The Yahoo User Interface library offers rollup support if you use their CDN. I'm using Zend Framework 1.8.0 and was wondering whats he best way to go about replicating this so as all our css or javascript files can be rolledup into one tag - thus one http request.

I am using the standard MVC components with a .htaccess file that rewrites everything through index.php unless the file or folder physicaly exists or is mapped on the server.

I'd like to have the final rollup file cached client side (if the client supports it) for efficency and further reduced http requests.

Was it helpful?

Solution

Hopefully I've understood your question correctly.

There are a couple of jobs here - one is to concatenate the content of several files in request variables into one response and then the other is the management of the caching process.

The first should be fairly simple, taking a list of paths and adding the contents to the file in memory, and the second can be managed easily with this great helper which allows you to easily set modified/expires headers to allow client side caching

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top