Задать вопрос

Тел: +7 965 3737 888

455

Просмотров

2

Ответов

versioned_media templatetag

<p>Best practice based on <a href="http://developer.yahoo.com/yslow/">YSlow recommendations</a>, add the following to your Apache config for your media directory.</p>
&lt;Directory /home/.../site_media/&gt;
    ...
    FileETag None
    ExpiresActive on
    ExpiresDefault "access plus 10 years"
    AddOutputFilterByType DEFLATE text/css application/x-javascript
&lt;/Directory`

<p>Make sure to enable mod_deflate and mod_expires.</p>

Вопрос полезен? Да0/Нет0
file_2460.py(489.0б)
None

Ответы (2):

Ответdnordberg:07.08.2008
Ответ полезен? Да0/Нет0

I used django_templatecomponents which provides most of the minification and grouping features django-compress does.

In regards to the query string causing some browsers not to cache scripts, can you elaborate?

For my applications I don't really need to support older browsers.

Ответpigletto:07.08.2008
Ответ полезен? Да0/Нет0

There are two issues:

  1. AFAIK using query string parameter may cause some browsers not to cache scripts

  2. there already is nice solution for this kind of stuff: django-compress

I had my own solution, similiar to yours, but when django-compress appeared I've switched to it and so far I'm very happy with this.