Can cs-cart minify js and css without any addon?

Hello,

I found this blog Store performance on CS-Cart where it say that we can minify js and css simply using cs-cart config.local fille suing this hooks:

// Tweaks
$config[‘tweaks’] = array (
‘js_compression’ => true, // enables compression to reduce size of javascript files
‘check_templates’ => false, // disables templates checking to improve template engine speed
‘inline_compilation’ => true, // compiles nested templates in one file
‘anti_csrf’ => false, // protect forms from CSRF attacks
‘disable_block_cache’ => false, // used to disable block cache
‘join_css’ =>true, // is used to unite css files into one file
‘allow_php_in_templates’ => false, // Allow to use {php} tags in templates

I pasted on my config.local file but nothing happen.

1 Like

Hi!

By default, CS-Cart minifies JS automatically and will not do this only if the dev_js tweak is enabled.

Regarding the other tweaks, it looks like the article that was written 10 years ago is simply outdated:
js_compression - there is no such tweak in the supported versions;
‘check_templates’ - there is no such tweak in the supported versions;
‘inline_compilation’ - there is no such tweak in the supported versions;
anti_csrf - is not linked to JS/CSS minification. Please do not alter this tweak if you don’t know what it is for.
disable_block_cache - disables block caching. Disabling it will affect store’s performance, do not recommend disabling it.
join_css - there is no such tweak in the supported versions;
allow_php_in_templates - there is no such tweak in the supported versions;