Ensure the cookie exists. There's no point in deleting a cookie that doesn't exist, so ensure the cookie is not null before deleting it. In this example, if the "Hello" cookie returns null, then the cookie does not exist.
Delete a cookie automatically by setting an expiration date on the client. This will delete the cookie from the machine once it expires. The following deletes a cookie within five days from the current date.