While looking at various posts on private and public download methods and issues I came across the xsend module which sounds very promising. One important question I have is does using private downloads with the xsend module allow css optimization? From what I have read I am under the impression that one of the drawbacks of the Drupal private download method is that css optimization is not possible. Maybe this is a misunderstanding.

Thanks,

Izzy

Comments

izmeez’s picture

I am wondering if anyone can help me with this question.

If X-send file is installed does it handle css and js optimization
or is it still necessary to consider additional patches such as http://drupal.org/node/572516 ?

Thanks,

Izzy

hypertext200’s picture

Here I'm using override of Drupal private download with X-send so not sure about CSS optimizations, unless Drupal it self support it.

izmeez’s picture

Yes, Drupal supports CSS optimization and JS optimization.

In Drupal 6.x goto admin/settings/performance.

If CSS or JS optimization is enable the following folders appear /files/css and /files/js and contain the aggregated files.

Other modules can also create folders for temporary files that are also used for anonymous visits such as google analytics, and gmap.

So, I am wondering how the xsend file module applies to these files. Does it handle them without conflict?

Thanks,

Izzy

arhak’s picture

marcoka’s picture

Status: Active » Fixed

in privat file mode, afaik, there is no aggregation avaliable

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

ñull’s picture

Title: Does private download with xsend module allow for css optimization » Private download with xsend module and css / js optimization
Status: Closed (fixed) » Needs work

There is a way to use mixed private and public file mode in Drupal 6. In that way you can use js and css optimization. In stead of setting Drupal to private mode you use mod_rewrite rules in .htaccess to redirect file requests to the secure system/files path. I tried this with the sites/default/files path and put this in .htaccess:

SetHandler Drupal_Security_Do_Not_Remove_See_SA_2006_006
Options None
Options +FollowSymLinks
XSendFile on

<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^(.*)$ /system/files/$1 [L,R=301]
</IfModule>

Now you only need to disable secure file mode In the files/css and files/js folders by adding a .htaccess to them with:

<IfModule mod_rewrite.c>
RewriteEngine off
</IfModule>

This will switch off the secure redirection for these folders and will be served as usual. This works well together with the xsend module.