title: Deleting duplicate JavaScript cookies based on the scope of domain and name
body: <p>I recently changed the scope of some JavaScript cookies on our site. They were all scoped to the subdomain in which they were created. They are now scoped globally to the domain. The issue is I now have duplicate cookies that have different scopes.Is it possible to programatically eliminate the JavaScript cookies based on name and scope (domain)? Example: </p>
  
  <p>cookieA --> domain=.mysite.com</p>
  
  <p>cookieA--> domain=sub.mysite.com</p>
  
  <p>cookieB --> domain=.mysite.com</p>
  
  <p>cookieB --> domain=sub.mysite.com</p>
  
  <p>I want to remove only cookies with domain = sub.mysite.com by name.</p>