Yes, of course this line used for module "Compare"
This used for action add, remove or remove all products
Example of use function with "header'
public function processRemoveAll()
{
header('Content-Type: application/json');
$productsIds = array();
$productsIds = Tools::jsonEncode($productsIds, true);
$this->context->cookie->__set('brilliantCompare', $productsIds);
$this->ajaxDie(Tools::jsonEncode(array(
'success' => true,
'data' => [
'message' => $this->module->l('All products removed','actions'),
'type' => 'removedAll',
'view' => $this->module->l('View compare','actions')
]
)));
}