'How to delete HttpOnly cookie in offline PWA?

After I've done a lot of reading about what is more secure. So for my PWA, I switched from a JWT stored in localStorage to one stored in a HttpOnly cookie. But now I'm having problems with the logout, as I can't delete the cookie while in offline mode?

Before, I simply removed the JWT from the local storage, but what's the correct solution to delete HttpOnly cookies when the server is not reachable?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source