Tuesday, October 31, 2017

Delete Cookies

Cookies are files containing data that is used by websites to remember user preferences and other relevant information ,such as authentication credentials. In some cases, we may need to delete cookies in order to do following.
1. Test if a site detects that the cookies are missing
2. Test if a site responds accordingly to the browser's configuration for example it prompt for approval, and then stores the selection
3. Test if a site responds according to application requirements for example, prompts for login if an authentication cookie is missing.

Simple way to achieve cookie deletion as follow.

To delete all cookie
Webutil.deletecookies()

To delete specific cookie from a domain
Webutil.deletecookie(domain,cookie)

No comments:

Post a Comment