Cookie Support
Using the CookieManager class you can:
Retrieve cookies for a particular website from the browser
Set the contents of a cookie in the browser
Create a new cookie in the browser
Delete a cookie in the browser
Retrieving Cookies
There are two functions that can be used to retrieve cookies from the browser:
These functions retrieve all the cookies from the browser for the specified website. For example:
Creating and Setting Cookies
Below is an example of how to create or set a cookie. If the cookie already exists, it will be overwritten. If it does not exist, a new cookie will be created in the browser:
Deleting Cookies
Here is an example of how to delete a cookie:
A simple foreach loop can be used to delete all the cookies for a particular website: