# django-compressor > Compresses linked and inline JavaScript or CSS into a single cached file. - 📖 [https://django-compressor.readthedocs.io/](https://django-compressor.readthedocs.io/) - 📦 [https://pypi.org/project/django-compressor/](https://pypi.org/project/django-compressor/) - 🛠️ [https://github.com/django-compressor/django-compressor](https://github.com/django-compressor/django-compressor) ## Installation Install `django-compressor` and configure it per their documentation. `dj-angles` will automatically detect its presence and enable the `` tag. ```python # settings.py INSTALLED_APPS = [ ... "compressor", ... ] STATICFILES_FINDERS = [ "django.contrib.staticfiles.finders.FileSystemFinder", "django.contrib.staticfiles.finders.AppDirectoriesFinder", "compressor.finders.CompressorFinder", ] TEMPLATES = [ { ... "OPTIONS": { ... "builtins": [ "compressor.templatetags.compress", # optional for `django-compressor` ], }, }, ] ``` ## Example ### CSS Compression ```html {% compress css %} {% endcompress %} ``` ### JavaScript Compression ```html {% compress js %} {% endcompress %} ``` ### Inline Compression Use the `inline` attribute to embed compressed content directly in the HTML: ```html {% compress css inline %} {% endcompress %} ``` ### Preload Mode ```html {% compress css preload %} {% endcompress %} ``` ### Named Blocks Use the `name` attribute to specify a block name: ```html {% compress css inline critical-styles %} {% endcompress %} ```