The CSS and JavaScript caches

The "Compresseur" extension in SPIP is used to compress the various CSS and Javascript elements to restrict the number of calls to the server and the size of the generated files.

This compression is active by default in the private zone, and can be deactivated using the constant _INTERDIRE_COMPACTE_HEAD_ECRIRE.


This compression can be activated on the public zone depending on the configuration selected. SPIP will create a compressed CSS file for each media type (screen, print...), and a compressed JavaScript file for all of the external scripts defined in the HEAD of the HTML page.

These files are cached in local/cache-js/ and local/cache-css/. These caches are recalculated whenever the var_mode=recalcul parameter is passed in the URL.

Author Mark Baber Published :

Translations : English, français