DeleteCookies

Removes cookies from profile, according with specified template

Syntax

procedure DeleteCookie(aTemplate: TCSCookie);

Parameters

  • aTemplate
    • type: TCSCookie
    • functions: template for cookie removing

Notes

  • If the value of aTemplate.name is an empty string , then all cookies are to be removed , independently of the name value, otherwise the cookies , the value of which is equal to name aTemplate.Name will be selected.
  • If the value of aTemplate.value is an empty string, then all cookies are to be removed, independently of value parameter, otherwise the cookies , the value parameter of which is equal to aTemplate.value will be selected.
  • If the value of aTemplate.domain is an empty string, then all cookies are to be removed, independently of domain value, otherwise the cookies, domain value of which is equal aTemplate.domain will be selected.
  • If the value of aTemplate.path is an empty string, then all cookies are to be removed, independently of path value, otherwise the cookies, path value of which is equal aTemplate.path will be selected.
  • If the value of aTemplate.creation equals to -1, then all cookies are to be removed, independently of creation value, otherwise the cookies, creation value of which is equal aTemplate.creation will be selected.
  • If the value of aTemplate.lastAccess equals to -1, then all cookies are to be removed, independently of lastAccess value, otherwise the cookies, lastAccess of which is equal aTemplate.lastAccess will be selected.
  • If the value of aTemplate.expires equals to -1, then all cookies are to be removed, independently of expires value, otherwise the cookies, expires value of which is equal aTemplate.expires will be selected.

Examples

  1. //Delete cookies related to the domain .yandex.ru
    var template: TCSCookie;
    template.name := '';
    template.value := '';
    template.domain := '.yandex.ru';
    template.path := '';
    template.creation := -1;
    template.lastAccess := -1;
    template.expires := -1;
    DeleteCookies(template);