You cannot detect cookie deletion “instantly,” but you can detect it on the next request. That’s the standard, secure approach: let the backend validate tokens and let the frontend respond by logging out when unauthorized.