public function removeCookie(string $name, bool $defer = false): self
    {
        if ($this->type == self::TYPE_REQUEST) {
            throw new HttpException('You cannot modify request cookies');
        }

        unset($this->cookies[$name]);
        if (!$defer) { // remove instantly
            $this->sendCookie($name, null, 0);
        }

        return $this;
    }