title: How to filter cookies when you send ajax request?
body: <p>If you send ajax request to a server and your size of cookies is too large, you get the message:</p>
  
  <blockquote>
    <p>Bad Request</p>
    
    <p>Your browser sent a request that this server could not understand.
    Size of a request header field exceeds server limit.</p>
    
    <p>Cookie</p>
  </blockquote>
  
  <p>Is there any way to filter cookies via javascript (jQuery, Angular) before sending request? For example: I have 25kb of cookies on the certain website (limit on the server is 16kb), there is a session cookie among them. How I can send only session cookie to the server or the cookies which I want? Is this possible without deleting redundant cookies?</p>
  
  <p>Another example:
   I have domain cookies <code>.mysite.com</code>. If i go to <code>one.mysite.com</code> I get another cookies, when I go to <code>two.mysite.com</code> new cookies are installed and etc. When I send ajax request from one of those sites cookies are summarizing and they all goes to Header of request which may exceed server limit.</p>
  
  <p>I have a lot of cookies, but no one is exceeds 3kb. The main question is : Can I filter cookies in JavaScript by domain name?</p>