Function clear
Source pub fn clear(name: &str) -> Result<(), CookieError>
Expand description
Deletes a cookie by name.
§Example
ⓘ#[server]
async fn logout() -> Result<(), ServerFnError> {
dioxus_cookie::clear("session")?;
Ok(())
}
- Server: Sets cookie with immediate expiration
- Browser: Removes from
document.cookie
- Desktop/Mobile: Removes from system keyring