[...]

> 4. the way it works now - same as before - is that css is fed from a php 
> url. The result is cached on the server as well as in the browser. 
> Another possible approach would be to generate the file on demand, store 
> it on the file system, and return an url to the static content. That 
> would have the benefit of being a bit faster - no php overhead - but  we 
> would loose the ability to control http headers. Which means that 
> somebody would need to configure expire headers on the web server to 
> complete the configuration. So I left the things the way they are.

Drupal has a semi-elegant way of doing this: when you enable caching
(through he Boost module), you can generate a model .htaccess set of
directives that you have to copy and paste inside your .htaccess. If you
don't, you don't benefit from the caching boost (or at least not at the
same level, as you just mentioned). If you do, the web server takes some
redirections in charge before handing the request over to PHP.

> 5. Note that images have the same issues. In theory somebody need to 
> turn on expire headers on the server side and, if you do that, you 
> browser will likely not refresh unless you change the url. So we may 
> work on that in the future.

There is another method for optimizing the image load, which is to use
the CDN methodology (Content Delvery Network), which basically points
all images to a URL in another subdomain (even if they are actually in
the same web directory) which then reduces the load on your main
subdomain (the one handling PHP) and allows you (once the logic is in
place) to spread the load for static resources (images, videos, audios)
between different servers (this is the way Amazon EC2 and other "cloud"
services work). Obviously, this is not necessary right now, but I'm
mentioning it to avoid taking a decision now that would make this
difficult to implement in the future.

Yannick


_______________________________________________
Dev mailing list
Dev@lists.chamilo.org
http://lists.chamilo.org/listinfo/dev

Reply via email to