Microsoft KB Archive/941495

From BetaArchive Wiki
Knowledge Base


Internet Explorer increases the per-domain cookie limit from 20 to 50

Article ID: 941495

Article Last Modified on 8/29/2007



APPLIES TO

  • Windows Internet Explorer 7 in Windows Vista
  • Windows Internet Explorer 7 for Windows Server 2003
  • Windows Internet Explorer 7 for Windows Server 2003 IA64
  • Windows Internet Explorer 7 for Windows XP
  • Microsoft Internet Explorer 6.0
  • Microsoft Internet Explorer 5.01



INTRODUCTION

This article describes an increase in the per-domain cookie limit of Internet Explorer from 20 to 50.

By default, Internet Explorer can store a maximum of 20 cookies for each domain. If a server in the domain sends more than 20 cookies to a client computer, the browser on the client computer automatically discards some old cookies.

Each cookie consists of a single name-value pair. This pair may be followed by attribute-value pairs that are separated by semicolons.

MORE INFORMATION

This limit has been increased to simplify the development and the hosting of Web applications on domains that must use many cookies. Installing update 937143 increases the number of cookies that Internet Explorer can store for each domain from 20 to 50. For more information about this update, click the following article number to view the article in the Microsoft Knowledge Base:

937143 MS07-045: Cumulative Security Update for Internet Explorer


After you install this update, the following two limits remain unchanged:

  • The document.cookie property can retrieve only 4,096 bytes of a cookie on a client computer. If the cookie string is longer than 4,096 bytes, the property returns an empty string.
  • Internet Explorer and the HTTP Wininet API ignore the Set-Cookie header if its length exceeds 5,118 bytes.

For functionality and performance reasons, we recommend that you use as few cookies as possible and that the cookies be as small as possible. Additionally, applications should be able to handle the loss of a cookie.

For more information, click the following article number to view the article in the Microsoft Knowledge Base:

306070 Number and size limits of a cookie in Internet Explorer


Keywords: kbhowto kbinfo kbexpertiseinter KB941495