web_remove_cookie

Removes the specified cookie.

C Language

int web_remove_cookie( const char *Cookie);

Java Language

int object.remove_cookie( String Cookie) ;
Argument
Description
object
An expression evaluating to an object of type WebApi. Usually web for Java. See also Function and Constant Prefixes.
Cookie
The name of the cookie to remove. The VALUE of the name is not required, and is ignored if it is specified.

Return Values

This function returns LR_PASS (0) on success, and LR_FAIL (1) on failure.

Parameterization

The following argument(s) can be parameterized using standard parameterization: Cookie

General Information

The web_remove_cookie function removes a cookie from the list of cookies available to a Vuser. This function specifies the name of the cookie to remove.

Note: Vusers do not use (access or modify) the cookies that are stored by your browser. Instead, each script uses the cookies that are sent to the Vuser by the server host at runtime. These cookies are maintained only while the script runs. The web-cookie functions (web_add_cookie, web_remove_cookie, and web_cleanup_cookies) only manipulate these temporary cookies.

You can refine the function's usage by specifying the path and/or domain cookie attributes from the original function call. This enables you to delete one cookie among cookies with identical names, but different path and/or domain attributes. Note that if you delete a cookie using only the Cookie name (without the path or domain), the function deletes all cookies with that name, disregarding their domain and path.

web_remove_cookie is added by the user when enhancing the script. It is not recorded.

This function is supported for all web scripts.